aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/tnl/t_rasterpos.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/tnl/t_rasterpos.c')
-rw-r--r--mesalib/src/mesa/tnl/t_rasterpos.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mesalib/src/mesa/tnl/t_rasterpos.c b/mesalib/src/mesa/tnl/t_rasterpos.c
index a7e4397b6..17611cd21 100644
--- a/mesalib/src/mesa/tnl/t_rasterpos.c
+++ b/mesalib/src/mesa/tnl/t_rasterpos.c
@@ -167,10 +167,7 @@ shade_rastpos(struct gl_context *ctx,
continue;
}
else {
- double x = PV_dot_dir * (EXP_TABLE_SIZE-1);
- int k = (int) x;
- GLfloat spot = (GLfloat) (light->_SpotExpTable[k][0]
- + (x-k)*light->_SpotExpTable[k][1]);
+ GLfloat spot = powf(PV_dot_dir, light->SpotExponent);
attenuation *= spot;
}
}
@@ -217,8 +214,7 @@ shade_rastpos(struct gl_context *ctx,
n_dot_h = DOT3(normal, h);
if (n_dot_h > 0.0F) {
- GLfloat spec_coef;
- GET_SHINE_TAB_ENTRY( ctx->_ShineTable[0], n_dot_h, spec_coef );
+ GLfloat spec_coef = _mesa_lookup_shininess(ctx, 0, n_dot_h);
if (spec_coef > 1.0e-10) {
if (ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) {