Definitions
- Linear-sRGB / THREE.LinearEncoding: Linear transfer functions, Rec. 709 primaries, D65 white point.
- sRGB / THREE.sRGBEncoding: sRGB transfer functions, Rec. 709 primaries, D65 white point.
Best practices
- Textures with color data (
.map,.emissiveMap, …) should be configured with.encoding = sRGBEncoding. Non-color textures useLinearEncoding. Exceptions exist for some formats (like OpenEXR), which typically useLinearEncodingfor color data. - Vertex colors should be stored in Linear-sRGB.
- Materials and lights require RGB components in Linear-sRGB. Hexadecimal and CSS colors are generally sRGB, and must be converted.1
- Renderer should have
.outputEncoding = sRGBEncodingwhen not using post-processing. With three.js default post-processing, useLinearEncodingand apply a GammaCorrectionShader