fix sun specular mult on voxy water. fix tiny code problem where sun reflection wouldnt actually disable

This commit is contained in:
Xonk
2025-12-28 22:59:36 -05:00
parent 4a47cee1b4
commit 5bb6ba3685
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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