2
0
taurreco 2 жил өмнө
parent
commit
9632337736
1 өөрчлөгдсөн 1 нэмэгдсэн , 2 устгасан
  1. 1 2
      src/sr_shaders.c

+ 1 - 2
src/sr_shaders.c

@@ -24,7 +24,6 @@
  *********/
 
 /* clamps float value between 0 and 1 */
-
 static float
 clamp(float v)
 {
@@ -207,7 +206,7 @@ phong(float* color, float* pos, float* normal, struct sr_uniform* uniform)
                 vec3_sub(tmp, pos, light.pos);
                 normalize(tmp);
                 normalize(light_dir);
-                float x = acos(dot(a, tmp));
+                float x = acos(dot(light_dir, tmp));
                 float inner = light.spot_angle - light.spot_penumbra;
                 float outer = light.spot_angle;
                 if (x <= inner) {