From 97d4e1cfb268b94f9ddccc1f91f113292a8e9eea Mon Sep 17 00:00:00 2001 From: doodlum <15017472+doodlum@users.noreply.github.com> Date: Mon, 9 Feb 2026 19:27:33 +0000 Subject: [PATCH 1/3] fix: fix blown out water specular --- package/Shaders/Water.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/Shaders/Water.hlsl b/package/Shaders/Water.hlsl index 402328417d..6a35f41c71 100644 --- a/package/Shaders/Water.hlsl +++ b/package/Shaders/Water.hlsl @@ -1096,7 +1096,7 @@ float3 GetSunColor(float3 normal, float3 viewDirection) float reflectionMul = exp2(VarAmounts.x * log2(saturate(dot(reflectionDirection, SunDir.xyz)))); float llDirLightMult = (SharedData::linearLightingSettings.enableLinearLighting && !SharedData::linearLightingSettings.isDirLightLinear) ? SharedData::linearLightingSettings.dirLightMult : 1.0f; - return reflectionMul * Color::DirectionalLight(SunColor.xyz / max(llDirLightMult, 1e-5), SharedData::linearLightingSettings.isDirLightLinear) * SunDir.w * DeepColor.w * llDirLightMult; + return reflectionMul * Color::DirectionalLight((SunColor.xyz * SunDir.w) / max(llDirLightMult, 1e-5), SharedData::linearLightingSettings.isDirLightLinear) * saturate(DeepColor.w) * llDirLightMult; # endif } # endif From f074c0c64f48fc4eb4c20ed8bfb2292543c36ae9 Mon Sep 17 00:00:00 2001 From: doodlum <15017472+doodlum@users.noreply.github.com> Date: Mon, 9 Feb 2026 20:36:04 +0000 Subject: [PATCH 2/3] chore: tonemap instead --- package/Shaders/Water.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/Shaders/Water.hlsl b/package/Shaders/Water.hlsl index 6a35f41c71..b1894486a7 100644 --- a/package/Shaders/Water.hlsl +++ b/package/Shaders/Water.hlsl @@ -1096,7 +1096,7 @@ float3 GetSunColor(float3 normal, float3 viewDirection) float reflectionMul = exp2(VarAmounts.x * log2(saturate(dot(reflectionDirection, SunDir.xyz)))); float llDirLightMult = (SharedData::linearLightingSettings.enableLinearLighting && !SharedData::linearLightingSettings.isDirLightLinear) ? SharedData::linearLightingSettings.dirLightMult : 1.0f; - return reflectionMul * Color::DirectionalLight((SunColor.xyz * SunDir.w) / max(llDirLightMult, 1e-5), SharedData::linearLightingSettings.isDirLightLinear) * saturate(DeepColor.w) * llDirLightMult; + return reflectionMul * Color::DirectionalLight((SunColor.xyz * SunDir.w) / max(llDirLightMult, 1e-5), SharedData::linearLightingSettings.isDirLightLinear) * exp2(-DeepColor.w) * llDirLightMult; # endif } # endif From 82b6619e79a874013adb7ccad4da93720f6a35b2 Mon Sep 17 00:00:00 2001 From: doodlum <15017472+doodlum@users.noreply.github.com> Date: Mon, 9 Feb 2026 23:04:08 +0000 Subject: [PATCH 3/3] fix: fix nonsense --- package/Shaders/Water.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/Shaders/Water.hlsl b/package/Shaders/Water.hlsl index b1894486a7..bc0ea61999 100644 --- a/package/Shaders/Water.hlsl +++ b/package/Shaders/Water.hlsl @@ -1096,7 +1096,7 @@ float3 GetSunColor(float3 normal, float3 viewDirection) float reflectionMul = exp2(VarAmounts.x * log2(saturate(dot(reflectionDirection, SunDir.xyz)))); float llDirLightMult = (SharedData::linearLightingSettings.enableLinearLighting && !SharedData::linearLightingSettings.isDirLightLinear) ? SharedData::linearLightingSettings.dirLightMult : 1.0f; - return reflectionMul * Color::DirectionalLight((SunColor.xyz * SunDir.w) / max(llDirLightMult, 1e-5), SharedData::linearLightingSettings.isDirLightLinear) * exp2(-DeepColor.w) * llDirLightMult; + return reflectionMul * Color::DirectionalLight((SunColor.xyz * SunDir.w) / max(llDirLightMult, 1e-5), SharedData::linearLightingSettings.isDirLightLinear) * (1.0 - exp(-DeepColor.w))* llDirLightMult; # endif } # endif