-
-
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
clean up of texture.encoding support of WebGLRenderTarget #8227
Conversation
clean up of texture.encoding support of WebGLRenderTarget
Thanks! |
In case you missed it... Any comments about this? |
Well, I am not sure exactly what that is. There are a few different color profiles in browser space -- there is possibly an color profile stored in PNG and JPG and other files, often sRGB or Adobe RGB or even a LUT. If this applies that, it would be useful and means that one can get rid of sRGB decoding as long as one is loading the data directly from an HTMLImageElement. Although does it always apply the same profile to these images based on the image headers or does it use some type of default browser setting? I guess some experiments are in order. How does that option interact with https://www.khronos.org/registry/webgl/extensions/EXT_sRGB/ ? I think that both situations can be handled via falling back to texture.decode = THREE.LinearEncoding at least in relation to the generation of the shader, thus letting non-glsl parts of the system handle the decoding of the texture? I am currently adding support for output encoding. The primary reason for the encoding is for using HDR formats, RGBM, RGBE and RGBD, while using it for sRGB is sort of a side benefit because it works on every browser regardless of extensions or WebGL 2. |
/ping @kenrussell |
Sorry for the delay replying. I'm not an expert on color spaces or color profiles. My understanding is that EXT_sRGB provides two main benefits:
You all have much more experience than I do with Three's colorspace handling, and what's needed for HDR rendering. I can provide input on what some browsers do during image decoding. Please take the following with a grain of salt, since I might well be wrong on some of the details.
Hope this information helps. Let me know if I can answer questions. |
Dealing with @mrdoob's suggestion here: #8217 (comment)