Has anyone ever mixed the RGB channels of an envmap (hdr) and applied them back to an env-sphere (equirectengular)? As far I understand three.js the size should be 2:1 (2048x1024) for fast processing.
If it’s possible what would be the best option performance-wise?
Thanks.
“Color-mixing” a high dynamic range (HDR) texture is not as simple as working with a standard [0,1] image… if you are not pretty careful here it’s easy to clamp the range of the texture so that it no longer works correctly as a light.
With that bit of caution, if you wanted to do this in a GLSL shader you could render a fullscreen plane filled with the HDR texture, apply the operations in GLSL, and render to a float or half-float render target, using LinearEncoding and without tone mapping to preserve the dynamic range.
Hi don,
I’m a total beginner in terms of GLSL coding.
Just to understand your point; you were referring to something like this? https://jsfiddle.net/Eketol/ynsLrwg6/
In combination with the rtt demo it might be something (?)
Perhaps — what effect are you going for? Depending on the goal, two more common approaches would be:
(A) use THREE.CubeCamera to render an environment from the scene itself
(B) generate the environment map from a separate, static scene (example: THREE.RoomEnvironment)
These tend to be expensive enough that you don’t want to update the environment map on every frame. There are some tradeoffs in terms of performance, environment map resolution, and quality.
I’ve got two exr’s mixing as highp float. but for some reason I can’t get the gamma correct.
Can anyone spot my mistake? ty https://jsfiddle.net/gree303/z4e1jmbk/37/
Also when I try adding GUI the scene won’t load anymore… can’t tell what’s wrong with it