diff options
Diffstat (limited to 'Shaders/world.frag')
-rw-r--r-- | Shaders/world.frag | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Shaders/world.frag b/Shaders/world.frag index c97c880..2b5ab5e 100644 --- a/Shaders/world.frag +++ b/Shaders/world.frag @@ -34,13 +34,13 @@ void main() for (int i = 0; i < LightNum; i++) { vec3 LightDir = vec3(LightPos[i].xy - fragCoord.xy, LightPos[i].z); - if (Flipped == 1) - LightDir.x = -LightDir.x; float D = length(LightDir); vec3 N = normalize(NormalMap * 2.0 - 1.0); vec3 L = normalize(LightDir); + if (Flipped == 1) + N.x = -N.x; vec3 Diffuse = (LightColor[i].rgb * LightColor[i].a) * max(dot(N, L), 0.0); |