Hi, I’ve tried to switch from r98 to r99 and suddenly the cubemap looks much brighter:
r98
r99
There is something different in r99 that should be taken into account when using textures?
Hi, I’ve tried to switch from r98 to r99 and suddenly the cubemap looks much brighter:
r98
r99
There is something different in r99 that should be taken into account when using textures?
Read the following thread for more information about this issue:
Try the following code:
renderer.gammaOutput = true;
renderer.gammaFactor = 2.2;
Besides, set the encoding
property for your CubeTexture
to THREE.sRGBEncoding
. This should produce a correct visual result.
Thanks, changing the cube texture encoding solvedthe issue. Is this something related only to cube maps or must be done for every texture used in the scene?
If you use GLTFLoader
automatically sets THREE.sRGBEncoding
for diffuse, emissive and specular maps. If you load textures by yourself via THREE.TextureLoader
, you also have to set the correct encoding for your respective texture.
Ok, but given a texture, how can I know which encoding should I use? Is there any tool that can tell me that?
Photoshop can show you the color profile of an image. A PNG texture looks like this…
BTW: Even untagged images (without embedded color profile) are normally interpreted as sRGB. So if you use PNG or JPEG as a color texture, you can always set THREE.sRGBEncoding
.
Perfect, thanks!