Open benzsuankularb opened 8 months ago
Hey, thanks for reporting.
I see, that was a somewhat hack I implemented. The idea is to disable only specular and not diffuse environment lighting for all materials. Well with SSGI where both these things are calculated I can fix it by enforcing that the envMapIntensity of the scene is set to 0. However, with SSR it's more complicated. So it looks like I need to fix it by unsetting that after the render and not the frame. I'll look into it.
I have 2 WebGLRenderer(Canvas) in my web. However, The second one didn't make use of realism effects. But the env map goes black when realism effects were used in the first canvas.
I've dug a bit and found the patches of
ShaderChunk.envmap_physical_pars_fragment
(https://github.com/0beqz/realism-effects/blob/main/src/ssgi/utils/Utils.js)I also found the SSGIEffect is trying to disable the patch at the end of each frame. (https://github.com/0beqz/realism-effects/blob/main/src/ssgi/SSGIEffect.js) But that's not working when another renderer tries to use
envmap_physical_pars_fragment
along the way.