You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our Reflection probe implementation may be a bit danger. Because it switches envMap and envMap2 after setting up WebGL programs.
The Three.js renderer and other webgl modules generate shader code, get program cache, decide whether to change program, and so on, from material (and other objects) properties.
Switching envMap after setting up them can cause mismatch.
More proper implementation may be setting up envMap/2 first and then include them in the decision of shader code generation, program cache, and so on. (Or using the renderer hooks? I haven't deeply dug into them yet tho.)
The text was updated successfully, but these errors were encountered:
From Hubs-Foundation/hubs#5570
Description of the problem
Our Reflection probe implementation may be a bit danger. Because it switches
envMap
andenvMap2
after setting up WebGL programs.The Three.js renderer and other webgl modules generate shader code, get program cache, decide whether to change program, and so on, from material (and other objects) properties.
https://github.com/MozillaReality/three.js/blob/7c6fb585ffa7737544871d2bbd4b0864c316f148/src/renderers/WebGLRenderer.js
https://github.com/MozillaReality/three.js/blob/262eb259a1f92c3554a11353b7f52c13900f879e/src/renderers/webgl/WebGLProgram.js
https://github.com/MozillaReality/three.js/blob/12f550e0f44f68e5b6c946dd242ee08e42d209e4/src/renderers/webgl/WebGLPrograms.js
Switching
envMap
after setting up them can cause mismatch.More proper implementation may be setting up
envMap/2
first and then include them in the decision of shader code generation, program cache, and so on. (Or using the renderer hooks? I haven't deeply dug into them yet tho.)The text was updated successfully, but these errors were encountered: