summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/lodbias.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/progs/demos/lodbias.c b/progs/demos/lodbias.c
index bee06da80b..a9b5312fd7 100644
--- 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;
}