Now, when sRGB is optionally enabled for OpenGL rendering, how to deal with assets in sRGB format?
Assets are currently always converted in sRGB format by test_asset_builder.cpp, right?
But at runtime game enables sRGB only when GPU driver supports it. When it doesn't support the texture format will be GL_BGRA8, so texture is expected to be in linear space. Because currently it is always sRGB. That will lead to incorrect rendering.
How to deal with that? Duplicate texture assets (one in linear, one in sRGB)?
Or maybe because asset source is always linear space (bmp files) it is simpler to have asset textures always in linear space (always use GL_BGRA8 and not GL_SRGB8_ALPHA8) and do sRGB correction only for blending and framebuffer display?