0beqz / realism-effects

SSGI, Motion Blur, TRAA - Effects to enhance your three.js scene's realism
https://realism-effects-obeqz.vercel.app/
MIT License
1.41k stars 63 forks source link

Using environment map won't work in the MeshStandardMaterial after applied realism effect. #34

Closed benzsuankularb closed 5 months ago

benzsuankularb commented 11 months ago

Here is a minimal example. https://codepen.io/benzsuankularb/pen/WNLzMyg

Basically, I've setup 2 canvas One with Realism-Effect and one with normal MeshStandardMaterial. If both canvases are enabled then the env map in MeshStandardMaterial won't work. Both canvases didn't share any resources on the application layer.

I'm not sure if this is some issue on the Three / WebGL layer. Or there are some modifications on the Realism-Effect applied to the MeshStandardMaterial shader.

0beqz commented 5 months ago

Hey, sorry I must have overseen this issue. It's related to this one: https://github.com/0beqz/realism-effects/issues/42

It's due to a hacky way to disable a certain type of environment lighting (namely just reflections). I'm looking into it and try to use a better method.