summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/light.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r--src/mesa/main/light.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index f52ed8ed25c..67faf8a1452 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1032,6 +1032,7 @@ static void
update_modelview_scale( struct gl_context *ctx )
{
ctx->_ModelViewInvScale = 1.0F;
+ ctx->_ModelViewInvScaleEyespace = 1.0F;
if (!_math_matrix_is_length_preserving(ctx->ModelviewMatrixStack.Top)) {
const GLfloat *m = ctx->ModelviewMatrixStack.Top->inv;
GLfloat f = m[2] * m[2] + m[6] * m[6] + m[10] * m[10];
@@ -1040,6 +1041,7 @@ update_modelview_scale( struct gl_context *ctx )
ctx->_ModelViewInvScale = 1.0f / sqrtf(f);
else
ctx->_ModelViewInvScale = sqrtf(f);
+ ctx->_ModelViewInvScaleEyespace = 1.0f / sqrtf(f);
}
}
@@ -1216,4 +1218,5 @@ _mesa_init_lighting( struct gl_context *ctx )
ctx->_NeedEyeCoords = GL_FALSE;
ctx->_ForceEyeCoords = GL_FALSE;
ctx->_ModelViewInvScale = 1.0;
+ ctx->_ModelViewInvScaleEyespace = 1.0;
}