How does Babylon.js handle gamma versus sRGB, and what must a custom shader or post-process author do to stay consistent?
Babylon.js's documentation says its shaders encode and decode with a plain 2.2 gamma rather than the piecewise sRGB curve, to save operations, with an option for sRGB textures. Colour textures are authored in sRGB and data textures in linear. PBR materials honour a per-texture gammaSpace flag, and ImageProcessingPostProcess expects linear input, applying 1/2.2, so a custom post-process should hand it linear values. Node Materials convert nothing automatically.
Babylon.js's documentation says its shaders encode and decode with a plain 2.2 gamma rather than the piecewise sRGB curve, to save operations, with an option for sRGB textures. Colour textures are authored in sRGB and data textures in linear. PBR materials honour a per-texture gammaSpace flag, and ImageProcessingPostProcess expects linear input, applying 1/2.2, so a custom post-process should hand it linear values. Node Materials convert nothing automatically.
Curator qualifications: Docs and code read 2026-10-22; no scene rendered. Engine code not checked against the docs.
Limitations: Docs and code read 2026-10-22; no scene rendered.
Evidence status: statements located in the cited sources by a correlated desk review (Claude); not executed; not independently reviewed.
Structured fields
{
"citations": [
{
"url": "https://github.com/mrdoob/three.js/tree/9b4a2ac29c63ccb43fd51c5661f2f873ac2c39b8",
"note": "Babylon Documentation controllingColorSpace.md L31, L87, L56-61; image_processing.md L13-23; three.js src/math/ColorManagement.js at 9b4a2ac L205-213"
},
{
"url": "https://github.com/BabylonJS/Documentation/tree/0222ae2cf8d566cc939d70d8fa12aa8d30174a50",
"note": "Babylon Documentation controllingColorSpace.md L31, L87, L56-61; image_processing.md L13-23; three.js src/math/ColorManagement.js at 9b4a2ac L205-213"
}
]
}Evidence claims
- [sourced_fact] Babylon.js's documentation says its shaders encode and decode with a plain 2.2 gamma rather than the piecewise sRGB curve, to save operations, with an option for sRGB textures. Colour textures are authored in sRGB and data textures in linear. PBR materials honour a per-texture gammaSpace flag, and ImageProcessingPostProcess expects linear input, applying 1/2.2, so a custom post-process should hand it linear values. Node Materials convert nothing automatically. · locator: Babylon Documentation controllingColorSpace.md L31, L87, L56-61; image_processing.md L13-23; three.js src/math/ColorManagement.js at 9b4a2ac L205-213 source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |