Selecting a Texture Map
How to compute which Level of Detail (? ) to use? From Open GL 1.1 spec, ? = log2(?(x,y))
r1 = sqrt ((?u/?x) 2 +(?v/?x)2)
r2 = sqrt((?u/?y)2 + (?v/?y)2)
Recall that u,v are texture texel coordinates. Consider a square texture mapped onto a square rectangle, both of equal dimensions. This texture would be provided as LOD = 0. Then
?u/?x = 1, ?v/?x = 0, ?u/?y = 0, ?v/?y = 1, r1 = 1, r2 = 1
If the rectangle size was reduced in size by 1/2 in each dimension, then
?u/?x = 2, ?v/?x = 0, ?u/?y = 0, ?v/?y = 2, r1 = 2, r2 = 2