-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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: Transmission - Backdrop 3/3 #27880
Conversation
Looking good! Do you mind adding stats.js? |
Another thing I noticed is that the transmission seems to be one frame behind? (top-left sphere show the issue clearly) Screen.Recording.2024-03-14.at.2.37.11.PM.mov |
Let me know when this is ready to be reviewed again. The links in the first post no longer work. |
Yes! I think we can review it again. |
New links... I removed the old examples but I can recovery if necessary these are the new |
I've noticed a minor thing in |
Yes please 🙏 |
@Mugen87 I think that this is the same problem mentioned here #27880 (comment) referring to I think it's better to do this in another PR, this one is already very large, and makes very significant changes to the engine. Explaining better this #27880 (comment) comment, to continue the agonotic renderer, the Renderer needs to have all the necessary resources so that we do not execute this process in core, for example in |
@mrdoob The same code was used, just this change based from url parameter:
|
@mrdoob I think performance will no longer be a problem, I just did some tests on the M1 in Chrome with the frame-rate-limit disabled and got an average of Only the points mentioned above that I must resolve in other PRs. |
Looks good! |
Related issue: #25903, #26196, #27850
Introduction
material.backdropNode
allowed the manipulation of rendered objects as layers, similar to what we can do in Photoshop, for example, to add a node tooverlay
or any other filter with objects from the back, simply addmaterial.backdropNode = viewportSharedTexture().overlay( someNode )
.Here some exampels - https://threejs.org/examples/?q=backdrop
This PR introduces the last part of the
backdrop
implementation. This required some significant changes to the architecture, more details in the schematic below.Schema
WebGPURenderer - New
WebGLRenderer - Current
Now all rendering is done on
linear-colorspace
, and only if color space conversion or tone mapping is needed, a simple post-processing layer is applied to the final rendering. This approach honors the settings defined in rendering regardless of whether the material is set tomaterial.toneMapped=false
ormaterial.colorSpaced=false
.Refraction over Refraction
One of the big benefits is that we can have refraction over refraction, as we don't need RenderPass to
backdrop
work.WebGPURenderer
-> webgpu_loader_gltf_transmission_webgpuWebGLRenderer
-> webgl_loader_gltf_transmission_webglwebgpu_loader_transmission
material.toneMapped=false
andmaterial.colorSpaced=false
are no longer supported, these settings must be defined in therenderer
.