diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2000-07-10 18:06:19 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2000-07-10 18:06:19 +0000 |
commit | 3e78a0e5554b6c00c65b33c3b055f442fc16536b (patch) | |
tree | 4b8150638a6c00000c25837c550adc15b6369079 | |
parent | 674509fe9528df015a22849515af3e7be5e70212 (diff) |
Special case shine table construction to sample the [0,1) element at zero.
-rw-r--r-- | src/mesa/main/light.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 4495ba1f01..8b49e9d123 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1,4 +1,4 @@ -/* $Id: light.c,v 1.8.2.5 2000/07/07 14:33:49 keithw Exp $ */ +/* $Id: light.c,v 1.8.2.6 2000/07/10 18:06:19 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -1003,7 +1003,9 @@ static void compute_shine_table( struct gl_shine_tab *tab, GLfloat shininess ) int i; GLfloat *m = tab->tab; - for (i = 0 ; i < SHINE_TABLE_SIZE ; i++) { + m[0] = pow(0, shininess); /* special case for [0,1) -- sample at zero */ + + for (i = 1 ; i < SHINE_TABLE_SIZE ; i++) { double t = pow( (i+.5)/(GLfloat)(SHINE_TABLE_SIZE-1), shininess ); if (t < 1e-20) t = 0; m[i] = (GLfloat) t; |