sRGBTransferEOTF
Accurately converts an sRGB-encoded color into its physically correct linear value using the standard Electro-Optical Transfer Function (EOTF).
Core Advantages
Ensures physically correct lighting and color blending by encapsulating the complex standard conversion algorithm, leading to realistic rendering while greatly simplifying the color management workflow.
Common Uses
Decoding color textures (Albedo/Diffuse Maps) from sRGB to linear space for lighting calculations.
Converting sRGB color values from user interfaces (e.g., color pickers) to obtain correct physical brightness.
Serving as a fundamental building block for custom color correction pipelines that require switching between color spaces.
How to adjust
This is a fixed mathematical function with no adjustable parameters. Its effect is demonstrated by the difference between using it and not. For instance, when blending two colors, you must first convert each to linear space with this node and then blend the results. This yields a physically correct, bright mixed color, whereas blending directly in sRGB space results in a darker, muddy color.
Code Examples
1// Assume sRGBColorInput is an sRGB color from a UI
2const sRGBColorInput = uniform( new THREE.Color( '#FF8C00' ) );
3
4// Convert it from sRGB to linear space using sRGBTransferEOTF
5const linearColorOutput = sRGBTransferEOTF( sRGBColorInput );
6
7// Use the converted linear color for a material property
8material.colorNode = linearColorOutput;