Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPURenderer: Issues with PMREM Background. #28827

Closed
Mugen87 opened this issue Jul 7, 2024 · 0 comments · Fixed by #29089
Closed

WebGPURenderer: Issues with PMREM Background. #28827

Mugen87 opened this issue Jul 7, 2024 · 0 comments · Fixed by #29089
Milestone

Comments

@Mugen87
Copy link
Collaborator

Mugen87 commented Jul 7, 2024

Description

When working at the environment map, I've noticed two issues:

  1. When an environment map is assigned to Scene.background, the background node is always a PMREMNode which is not right. When no background blurriness is applied, the cube map format should be used. Since this is not the case, you can spot quality differences in the background when comparing below examples:

Here is the code that always produces a PMREM node:

if ( background.isCubeTexture === true || ( background.mapping === EquirectangularReflectionMapping || background.mapping === EquirectangularRefractionMapping ) ) {
backgroundNode = pmremTexture( background, normalWorld );

2. Sometimes when loading a page with a textured background, the texture isn't rendered at all and is black. When refreshing the page, the issue disappears. This does not happen if the code waits until the env map has been loaded (like in webgpu_loader_gltf). However, the new webgpu_materials_basic does not so it can be used as a test case.

Reproduction steps

Version

r167

Device

Desktop

Browser

Chrome

OS

MacOS

@Mugen87 Mugen87 changed the title WebGPURenderer: Issues with Background. WebGPURenderer: Issues with PMREM Background. Jul 7, 2024
@Mugen87 Mugen87 added this to the r168 milestone Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant