Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

r_forceBlendRegime to load legacy lightmaps in linear space or vice versa

Open slipher opened this issue 4 months ago • 0 comments

Allow loading maps with sRGB lightmaps with naive blending, or maps with non-sRGB lightmaps with linear blending. Use r_forceBlendRegime 1 for naive blending or r_forceBlendRegime 2 for linear blending.

TODO: models and vertex lighting. Out of precomputed lighting, just lightmaps work so far.

From some examples you can see that non-blended surfaces look similar between blend modes. Use of multi-texturing features like normal and specular increases the difference. But even non-blended, non-lit surfaces like the skybox can still have visible differences because texture filtering produces different results when the image is flagged as sRGB.

All screenshots are made with tonemapping disabled.

Non-sRGB lightmaps, naive blending:

unvanquished-plat23-srgb-forcefield

Non-sRGB lightmaps, linear blending (new!):

unvanquished-plat23-srgb-forcefield

sRGB lightmaps, linear blending:

unvanquished-plat23-srgb-forcefield

sRGB lightmaps, naive blending (new!):

unvanquished-plat23-srgb-forcefield

slipher avatar Oct 18 '25 15:10 slipher