From 5bb6ba36852e2b00f2d8df32961b0de6bd9d2374 Mon Sep 17 00:00:00 2001 From: Xonk Date: Sun, 28 Dec 2025 22:59:36 -0500 Subject: [PATCH] fix sun specular mult on voxy water. fix tiny code problem where sun reflection wouldnt actually disable --- shaders/dimensions/voxy_translucent.glsl | 2 +- shaders/lib/specular.glsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shaders/dimensions/voxy_translucent.glsl b/shaders/dimensions/voxy_translucent.glsl index d5a82fe..c4f0ad7 100644 --- a/shaders/dimensions/voxy_translucent.glsl +++ b/shaders/dimensions/voxy_translucent.glsl @@ -290,7 +290,7 @@ void voxy_emitFragment(VoxyFragmentParameters parameters) { #endif #if defined OVERWORLD_SHADER && SUN_SPECULAR_MULT > 0 - Reflections.rgb += (DirectLightColor * Shadows) * GGX(normal, -normalize(playerPos), WsunVec, roughness, f0); + Reflections.rgb += SUN_SPECULAR_MULT * DirectLightColor * Shadows * GGX(normal, -normalize(playerPos), WsunVec, roughness, f0); #endif FORWARD_RENDERED_COLOR.a = FORWARD_RENDERED_COLOR.a + (1.0-FORWARD_RENDERED_COLOR.a) * fresnel; diff --git a/shaders/lib/specular.glsl b/shaders/lib/specular.glsl index 3a2ad31..e65cf70 100644 --- a/shaders/lib/specular.glsl +++ b/shaders/lib/specular.glsl @@ -407,7 +407,7 @@ vec3 specularReflections( } #endif - #if defined OVERWORLD_SHADER || SUN_SPECULAR_MULT > 0 + #if defined OVERWORLD_SHADER && SUN_SPECULAR_MULT > 0 vec3 lightSourceReflection = SUN_SPECULAR_MULT * lightColor * GGX(normal, -playerPos, lightPos, roughness, reflectance, metalAlbedoTint); specularReflections += lightSourceReflection; #endif