mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2026-10-10 05:03:04 +08:00
fix sun specular mult on voxy water. fix tiny code problem where sun reflection wouldnt actually disable
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user