mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
index wasn't being calculated correctly (result was being discarded)
in light_ci()
This commit is contained in:
parent
a4fc8035f1
commit
4e5b58f483
1 changed files with 6 additions and 5 deletions
|
|
@ -962,11 +962,12 @@ static void TAG(light_ci)( GLcontext *ctx,
|
|||
else {
|
||||
GLfloat d_a = ind[MAT_INDEX_DIFFUSE] - ind[MAT_INDEX_AMBIENT];
|
||||
GLfloat s_a = ind[MAT_INDEX_SPECULAR] - ind[MAT_INDEX_AMBIENT];
|
||||
GLfloat i = (ind[MAT_INDEX_AMBIENT]
|
||||
+ diffuse[side] * (1.0F-specular[side]) * d_a
|
||||
+ specular[side] * s_a);
|
||||
if (i > ind[MAT_INDEX_SPECULAR]) {
|
||||
i = ind[MAT_INDEX_SPECULAR];
|
||||
|
||||
index = (ind[MAT_INDEX_AMBIENT]
|
||||
+ diffuse[side] * (1.0F-specular[side]) * d_a
|
||||
+ specular[side] * s_a);
|
||||
if (index > ind[MAT_INDEX_SPECULAR]) {
|
||||
index = ind[MAT_INDEX_SPECULAR];
|
||||
}
|
||||
}
|
||||
indexResult[side][j] = (GLuint) (GLint) index;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue