aboutsummaryrefslogtreecommitdiff
path: root/data/shaders/lighting.frag
diff options
context:
space:
mode:
Diffstat (limited to 'data/shaders/lighting.frag')
-rw-r--r--data/shaders/lighting.frag6
1 files changed, 3 insertions, 3 deletions
diff --git a/data/shaders/lighting.frag b/data/shaders/lighting.frag
index d4cb035..6e3fe65 100644
--- a/data/shaders/lighting.frag
+++ b/data/shaders/lighting.frag
@@ -63,9 +63,9 @@ void main() {
float falloff, spot;
float diff_fac, spec_fac;
- falloff = 1/ ( gl_LightSource[0].constantAttenuation
- + gl_LightSource[0].linearAttenuation * light0dist
- + gl_LightSource[0].quadraticAttenuation * light0dist * light0dist );
+ falloff = 1.0 / ( gl_LightSource[0].constantAttenuation
+ + gl_LightSource[0].linearAttenuation * light0dist
+ + gl_LightSource[0].quadraticAttenuation * light0dist * light0dist );
spot = max(dot(normalize(-light0vc), gl_LightSource[0].spotDirection), 0.0);
spot = pow(spot, gl_LightSource[0].spotExponent);