the documentation about WebGLRenderer states that:
.gammaInput If set, then it expects that all textures and colors are premultiplied gamma. Default is false.
.gammaOutput If set, then it expects that all textures and colors need to be outputted in premultiplied gamma. Default is false.
My understanding by examining the code is instead that:
- if gammaInput is true, textures in material are considered sRGB (e.g. diffuseTexture), so the fetched value is linearised before using it in calculations; however, colours (e.g. diffuse color) that are passed to the shader are considered as in linear space.
- if gammaInput is false, instead, textures and colors are considered as linear
- if gammaOutput is true, the final color computed by material shaders is gamma-encoded, otherwise not.
If my understanding is correct, I think the documentation is misleading.
In any case, using the MeshStandardMaterial, we should always use gammaOutput=true, right? Otherwise the display will show a wrong color – or are there any other gamma operations outside the shaders?