projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0480037
)
clamp BiasMin, BiasMax to reasonable values
author
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 26 Mar 2004 18:05:36 +0000
(18:05 +0000)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 26 Mar 2004 18:05:36 +0000
(18:05 +0000)
progs/demos/lodbias.c
patch
|
blob
|
history
diff --git
a/progs/demos/lodbias.c
b/progs/demos/lodbias.c
index bee06da80b0903b349ce41a307224fb9e7fdf5df..a9b5312fd75533ac17c3a7d452946da4ff76486d 100644
(file)
--- a/
progs/demos/lodbias.c
+++ b/
progs/demos/lodbias.c
@@
-252,6
+252,14
@@
static void Init( void )
printf("LOD bias range: [%g, %g]\n", -maxBias, maxBias);
BiasMin = -100 * maxBias;
BiasMax = 100 * maxBias;
+
+ /* Since we have (about) 8 mipmap levels, no need to bias beyond
+ * the range [-1, +8].
+ */
+ if (BiasMin < -100)
+ BiasMin = -100;
+ if (BiasMax > 800)
+ BiasMax = 800;
}