diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 00:50:59 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 00:50:59 +0100 |
| commit | fac6acf7daf3efd872814af34a8faac11a0a5c9d (patch) | |
| tree | 5a54e3349034de1d4f9a7528ee094b5caae9b977 /src/hl2h.cpp | |
| parent | Skybox image: drop Refresh/SetUndefined (crash after apply) (diff) | |
| download | hl2h-fac6acf7daf3efd872814af34a8faac11a0a5c9d.tar.gz hl2h-fac6acf7daf3efd872814af34a8faac11a0a5c9d.zip | |
Skybox image: match HDR sky colour decode
The HDR "sky" shader samples the compressed texture as rgb *= alpha,
multiplies by 8, then converts linear->sRGB for display. Feeding it the raw
sRGB image produced the blown-out / oversaturated sky.
When the map uses the HDR sky shader, pre-convert the image to linear and set
alpha to 1/8 so the 8x scale cancels and the final linear->sRGB conversion
restores the original colours. For LDR (UnlitGeneric) materials, create the
texture with TEXTUREFLAGS_SRGB so the normal sRGB sampling is used.
The first sky material's shader name is logged for confirmation.
Diffstat (limited to 'src/hl2h.cpp')
0 files changed, 0 insertions, 0 deletions
