-
-
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
Furnace Test Example: added transmission to the test #22335
Conversation
It appears that orthographic camera, PMREM, and/or transmission are mutually incompatible, so I reverted the camera back to a perspective one. |
Thanks! |
@Mugen87 If I expect all the promises in this example are not required, but even after removing them and simplifying the example to follow the typical three.js coding pattern, the issue remains. It seems like transmission thinks the background is black... |
I can reproduce. However it's not clear to me whether this is only an issue in the first frame or if the transmission implementation is frame-late in general. @takahirox Do you mind having a look? Here is a test case: https://jsfiddle.net/psjwzyft/ |
Doing this shows that it's a frame late indeed: function render() {
renderer.render(scene, camera);
renderer.render(scene, camera);
} |
OK, let me try hopefully this weekend |
I investigated the problem this weekend but I couldn't find the root issue. But I found some weird behaviors. Does anyone here have any clues from them?
So, sounds like the problem happens with |
After merging #22394, the following warning appears now in the first render call of the fiddle:
The warning does not appear in the unmodified version of the furnace test. |
Is seems the issue can be fixed by forcing a uniform update of the scene's background before the opaque objects are rendered for the transmissive pass. Meaning before the following line: three.js/src/renderers/WebGLRenderer.js Line 1269 in 57b7a9b
I add this hack. opaqueObjects[ 0 ].material.uniformsNeedUpdate = true; // the first render item is the skybox Of course this is only for testing since it just works with the fiddle. |
... plus other minor fixes.