Knob
Colour space (linear and sRGB)
You might say: linear and sRGB, linear workflow, gamma correction, sRGB texture
A colour space says how RGB numbers map to light and display. This knob chooses sRGB encoding for display colours or linear RGB for calculations.
- What it does
- Keeps lighting, blends and value readings in the space their equations expect.
- Ask
- Which inputs are display colours, and which inputs are data that must stay linear?
- Typical
- Colour textures and hex colours use sRGB-encoded values for display. Lighting, blending and measurement use linear values. Normal, roughness, metalness and mask maps stay linear.
- Trouble
- Using encoded values as if they were linear makes shading too dark or washed out, creates dark fringes in blends and skews value readings.
What to look for
- An sRGB texture setting sits beside a colour texture
- Encoded and linear swatch ramps show different numbers for the same displayed colour
- Normal, roughness, metalness and mask maps bypass colour conversion
Connections
- See also: Albedo
- See also: Tone mapping
- See also: Lightness (L*)
Sources
- Hubert Nguyen (ed.), GPU Gems 3, 24.2.3 Monitors Are Nonlinear, Renderers Are Linear
Renderers, shaders, and compositors like to operate with linear data.
- Hubert Nguyen (ed.), GPU Gems 3, 24.4.1 Input Images
Any input textures that are already gamma-corrected need to be brought back to a linear color space before they can be used for shading or compositing.
- Hubert Nguyen (ed.), GPU Gems 3, 24.4.1 Input Images
Alpha channels, normal maps, displacement values (and so on) are almost certainly already linear and should not be corrected further, nor should any textures that you were careful to paint or capture in a linear fashion.
- Unity Technologies, Linear textures, Linear authored Textures
lookup Textures, masks, and other textures with RGB values that mean something specific and have no gamma correction applied to them bypass sRGB sampling.
- W3C, CSS Color Module Level 4, Specifying sRGB colors
CSS provides several methods of directly specifying an sRGB color: hex colors, rgb()/rgba() color functions
- W3C, CSS Color Module Level 4, Mixing colors
the CIE XYZ, display-p3-linear or srgb-linear color spaces are appropriate, because they are linear in light intensity.
- W3C, CSS Color Module Level 4, Predefined sRGB Color Space
c is the gamma-encoded red, green or blue component. cl is the corresponding linear-light component.
Unverified: The opened references name masks and normal maps as linear data, but do not name roughness and metalness explicitly or use the exact symptom words 'washed out' and 'dark fringes'.
Use it on your project
teardown-apply: hold "Colour space (linear and sRGB)" (color-space) from the teardown at https://teardownatlas.com/environment-art/ against my project
Paste it into a coding agent that has the teardown skills.
An AI agent wrote this map with the teardown skill. It can contain errors: check the sources before you rely on a part. About and legal