aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_rasterpos.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl/t_rasterpos.c')
-rw-r--r--src/mesa/tnl/t_rasterpos.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c
index a7e4397b660..bdd6129e727 100644
--- a/src/mesa/tnl/t_rasterpos.c
+++ b/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;
}
}