-
-
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
Reflector/Refractor: Change render target setups. #24386
Conversation
I'm not confident about how to use HDR workflows within three.js post-processing, but I believe most of these changes should be omitted from |
/cc @vanruesc I believe this change is compatible with pmndrs/postprocessing, but just FYI. |
The name might be confusing but |
Hm, ReflectorForSSRPass is meant to be used together with SSRPass though, I assume? Individual surfaces should not be applying their own tone mapping and color space encoding, if we are going to use GammaCorrectionShader later: three.js/examples/webgl_postprocessing_ssr.html Lines 191 to 192 in 191a1ef
Within our current post-processing workflow, I don't think 1 pmndrs/postprocessing handles both sRGB and Linear output encoding automatically, readers using it should refer to pmndrs documentation instead. |
You're right. |
When using post processing, the defaults of One could consider that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using post processing, the defaults of WebGLRenderer.outputEncoding and WebGLRenderer.toneMapping should not be changed ...
To be more explicit, users should select renderer.outputEncoding=LinearEncoding
and renderer.toneMapping=NoToneMapping
(both defaults) when using three.js's provided post-processing implementation. Users of pmndrs/postprocessing should generally use sRGBEncoding
instead.
The PR looks ready to me if @WestLangley has no objection. :)
I'm happy if it implements what I said in #24384 (comment). I think there is agreement. I am not familiar with |
Fixed #24384.
Description
This PR improves HDR support for
Reflector
,Refractor
andReflectorForSSRPass
and makes the internal render target and shader setups more consistent.Reflector
,Refractor
andReflectorForSSRPass
now properly support color space conversion and tone mapping according to the renderer settings.Since half float textures are supported on all WebGL 2 devices, it should be a safe default. Just want to highlight that there is a small performance loss when using FP16 instead of UINT8. Not all apps are going to require FP16 but I think it's still an appropriate default.