summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/extras/shaders/es2/phong.inc.frag1008
1 files changed, 4 insertions, 4 deletions
diff --git a/src/extras/shaders/es2/phong.inc.frag100 b/src/extras/shaders/es2/phong.inc.frag100
index 0c326d0b6..c68c8e41a 100644
--- a/src/extras/shaders/es2/phong.inc.frag100
+++ b/src/extras/shaders/es2/phong.inc.frag100
@@ -66,8 +66,8 @@ void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3
if ( lights[0].type != TYPE_DIRECTIONAL ) {
s = lights[0].position - vpos;
if (lights[0].constantAttenuation != 0.0
- || light[0].linearAttenuation != 0.0
- || light[0].quadraticAttenuation != 0.0) {
+ || lights[0].linearAttenuation != 0.0
+ || lights[0].quadraticAttenuation != 0.0) {
FP float dist = length(s);
att = 1.0 / (lights[0].constantAttenuation + lights[0].linearAttenuation * dist + lights[0].quadraticAttenuation * dist * dist);
}
@@ -99,8 +99,8 @@ void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3
if ( lights[1].type != TYPE_DIRECTIONAL ) {
s = lights[1].position - vpos;
if (lights[1].constantAttenuation != 0.0
- || light[1].linearAttenuation != 0.0
- || light[1].quadraticAttenuation != 0.0) {
+ || lights[1].linearAttenuation != 0.0
+ || lights[1].quadraticAttenuation != 0.0) {
FP float dist = length(s);
att = 1.0 / (lights[1].constantAttenuation + lights[1].linearAttenuation * dist + lights[1].quadraticAttenuation * dist * dist);
}