Commit f1324139 authored by Brian Paul's avatar Brian Paul

clamp BiasMin, BiasMax to reasonable values

parent 04800374
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment