From 6ae8b41dd65f8bc74c80425c17978e5fa1d92b0c Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 00:55:04 +0100 Subject: Skybox image: recognise Sky_HDR_DX9 as the HDR sky shader The material reports shader "Sky_HDR_DX9", not "sky", so the linear/alpha compensation was never applied and the raw sRGB image was scaled by the HDR decode's 8x. Match the Sky_HDR prefix so the compensation path is used. --- src/world.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/world.cpp b/src/world.cpp index ddd047a..03b30a8 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -872,7 +872,11 @@ bool sky_uses_hdr_shader() { if (!is_sky_material(name, group)) continue; const char *shader = vfunc(mat, 49)(mat); - if (shader && strcmp(shader, "sky") == 0) + // The shipped shader is registered as "Sky_HDR_DX9" (older SDK name + // "sky"); match both and stay case-insensitive about the prefix. + if (shader && (strstr(shader, "Sky_HDR") != nullptr || + strstr(shader, "sky_hdr") != nullptr || + strcmp(shader, "sky") == 0)) return true; } return false; -- cgit v1.2.3