From 2cedd39a90fdb0387783b50446b16732517fb651 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Tue, 17 Sep 2019 19:09:33 -0400 Subject: World can now draw properly, and camera follows player --- Shaders/world.frag | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Shaders/world.frag') diff --git a/Shaders/world.frag b/Shaders/world.frag index 2b5ab5e..18945a8 100644 --- a/Shaders/world.frag +++ b/Shaders/world.frag @@ -22,7 +22,7 @@ uniform int Flipped; void main() { // Quadratic light falloff - vec3 Falloff = vec3(0.1, 0.2, 0.0); + vec3 Falloff = vec3(0.4, 0.1, 0.002); vec4 DiffuseColor = texture2D(textu, texCoord); @@ -33,7 +33,8 @@ void main() vec3 SumLight = vec3(0.0); for (int i = 0; i < LightNum; i++) { - vec3 LightDir = vec3(LightPos[i].xy - fragCoord.xy, LightPos[i].z); + vec3 LightDir = vec3(LightPos[i].xy - fragCoord.xy, + (LightPos[i].z - fragCoord.z)*2); float D = length(LightDir); -- cgit v1.2.3