mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
s/DP3/DP3_SAT/ to prevent negative values
This commit is contained in:
parent
968cbf94d9
commit
244adeb639
2 changed files with 2 additions and 2 deletions
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue