-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
WebGPURenderer: Added double-side transmission 2/2 #29718
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
@sunag a bit of a tangent here, but while you're in this part of the codebase: would it be possible to render transmissive objects that have transmission=1 and ior=1 with a regular transparent pass? This would improve performance on weaker devices (e.g. Quest 2/3) for the most typical case of "clear glass", which currently often needs to be emulated with opacity, since transmission always introduces a fullscreen pass at a big performance penalty. |
I think we can have barriers with normalmaps and other settings that influence the color in transmission and other validations that will have to be tested each frame, and animation, I would recommend creating a routine to replace the material if possible? The new architecture does not do a full-screen pass, but a copy of the current buffer to a texture, which is much faster regardless of the backend used. One possible next step for performance would be to use hashed blur and avoid generating mipmaps. |
Thanks!
I'm not sure this holds in practice on tiled GPUs – At least in my understanding, "no copy" will always be faster than "screen-space copy".
With what? I'm not aware of a good way to emulate how transmission is supposed to look without using transmission... |
Transmission without the framebuffer texture is not transmission anymore, I think your idea was to emulate it with opacity? |
Related issue: #29705
Description
Renders all back-side first in case of materials with transmission and double-side. This would only be noticeable with many objects with this setup in the scene.
WebGPURenderer's approach, unlike WebGLRenderer, does not render opaque objects twice, and keeps the sequence of transparent materials with transmission in the same sort, which is also an improvement.