Should my texture assets be linear or sRGB? In either case, what's the proper way to import them?
(There's a similar question on r/godot but I don't see any thorough answers.)
Godot seems to assume all PNG textures are linear, regardless of any gamma or sRGB info embedded in the PNG. I tested this by hex-editing a PNG to have various types of gAMA
and sRGB
chunks. This is at odds with most image editors, which tend to default to nonlinear color spaces. So if you create a PNG in e.g. Gimp and stick it on a Sprite3D, it will look washed-out by default.
Godot (in 3.2, at least) has an Srgb
import option which, when set to Enable
, makes such textures appear normal. But I'm concerned that:
- This option seems to have been removed from trunk.
- If the sRGB > linear conversion happens before the uint8 > float32 conversion, this will discard a lot of color precision.
- What's the point of
Srgb
's defaultDetect
setting if it doesn't detect actual sRGB PNGs?
There's also hint_albedo
, but I would hope users wouldn't have to write shaders just to make textures work as expected.
What's the recommended texture workflow?