-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGLRenderer: Fix equirect texture conversion. #20048
Conversation
|
Okay, should be fixed now! I actually like the simplifications in |
@@ -1502,6 +1504,10 @@ function WebGLRenderer( parameters ) { | |||
|
|||
initMaterial( material, scene, object ); | |||
|
|||
} else if ( materialProperties.envMap !== envMap ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, there is no way around this check. However, if an existing cube map is changed with another one, initMaterial()
will not trigger the expensive shader compilation (unless mode, encoding or mapping is different).
@Mugen87 Thank you for helping with this. :-) After preliminary testing, everything appears to be working correctly for me. |
Thanks! |
@Mugen87 Git bisect is pointing to this commit... Are you able to reproduce it? |
@WestLangley is this a continuation of a conversation from somewhere else? |
Ah, I see what @WestLangley means. The sphere should have the same env map like the background. |
It was a follow-up to my previous comment where I said:
I was not sure if it actually never worked, or broke subsequent to testing... |
Fixed #20043 (comment)
When you load an equirect texture,
WebGLCubeMaps
will returnnull
if the texture is not loaded yet. When the loading process is completed and the cube map was created, an update of the shader program is required. This missing bit was responsible for the uniform location errors.