diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-17 19:09:33 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-17 19:09:33 -0400 |
commit | 2cedd39a90fdb0387783b50446b16732517fb651 (patch) | |
tree | 78efc6f36096b7e0e0ff200220298c4ee7576bf1 /Shaders | |
parent | 0236eb7f6391c9d925dcaaddb8cb01ecfb7d5e55 (diff) |
World can now draw properly, and camera follows player
Diffstat (limited to 'Shaders')
-rw-r--r-- | Shaders/world.frag | 5 |
1 files changed, 3 insertions, 2 deletions
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); |