diff options
author | Brian Paul <[email protected]> | 2004-03-26 18:05:36 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-03-26 18:05:36 +0000 |
commit | f132413965a49c0554988a88edb8b101de657493 (patch) | |
tree | f0fa9cbeaad2ec5545673c989a6c6c9ea7301eca | |
parent | 04800374eef6eb906203e8721a2b8b208af2486f (diff) |
clamp BiasMin, BiasMax to reasonable values
-rw-r--r-- | progs/demos/lodbias.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/progs/demos/lodbias.c b/progs/demos/lodbias.c index bee06da80b0..a9b5312fd75 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; } |