diff options
Diffstat (limited to 'Shaders/world.frag')
-rw-r--r-- | Shaders/world.frag | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Shaders/world.frag b/Shaders/world.frag index 85941f2..881127b 100644 --- a/Shaders/world.frag +++ b/Shaders/world.frag @@ -17,6 +17,7 @@ uniform vec3 LightPos[32]; uniform vec4 LightColor[32]; uniform int LightNum; uniform vec4 AmbientLight; +uniform int Flipped; void main() { @@ -33,6 +34,8 @@ 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); |