summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-12-15 00:54:17 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-12-15 00:54:17 +0000
commit244adeb639cf13c531bcce78734b911fc19b943d (patch)
tree6a4b6abacb315adf69d773c9f167328f1929b51f /progs
parent968cbf94d90755a6bfb016ac501aca4d9006cbc8 (diff)
s/DP3/DP3_SAT/ to prevent negative values
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/arbfplight.c2
-rw-r--r--progs/demos/fplight.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/progs/demos/arbfplight.c b/progs/demos/arbfplight.c
index 50a1b7e9f3..d5508a6aa8 100644
--- a/progs/demos/arbfplight.c
+++ b/progs/demos/arbfplight.c
@@ -217,7 +217,7 @@ static void Init( void )
"MUL normal, fragment.texcoord[0], len.y; \n"
"# Compute dot product of light direction and normal vector\n"
- "DP3 dotProd, lightDir, normal; \n"
+ "DP3_SAT dotProd, lightDir, normal; # limited to [0,1]\n"
"MUL diffuseColor, Diffuse, dotProd; # diffuse attenuation\n"
diff --git a/progs/demos/fplight.c b/progs/demos/fplight.c
index 4f8b42aa96..6eb77c60ea 100644
--- a/progs/demos/fplight.c
+++ b/progs/demos/fplight.c
@@ -180,7 +180,7 @@ static void Init( void )
"MUL R1, f[TEX0], R1.y;\n"
"# Compute dot product of light direction and normal vector\n"
- "DP3 R2, R0, R1;"
+ "DP3_SAT R2, R0, R1;"
"MUL R3, Diffuse, R2; # diffuse attenuation\n"