From: Brian P. <br...@va...> - 2000-12-14 19:46:36
|
Daniel Vogel wrote: > > On Thu, Dec 14, 2000 at 10:16:58AM -0700, Brian Paul wrote: > > > > Are you settting GL_TEXTURE_BASE_LEVEL? > > No, I only set GL_TEXTURE_MAX_LEVEL and cut off the last two mip levels. > It also looks like the filters use the wrong base mipmap. Everything > looks overblurry from an angle and a naive guess would be that it's > taking everything 2 levels too far down. > > > I think I see an error in the calculation in _P. I think I should > > add the base level to it. However, that would increase _P. > > from mtypes.h: > > GLint _P; /* Highest mipmap level */ > GLfloat _M; /* = MIN(MaxLevel, P) - BaseLevel */ > > What do _P and _M actually mean? Is _P the highest mip level based on > the size of the image (e.g. 5 for 32x32) and _M supposed to be the one > after "clipping"? I should rename _P to _q (which is what the 1.2 spec uses now). q is the highest-numbered mipmap level that can actually be used, after taking in account the image sizes and the value of GL_TEXTURE_MAX_LEVEL. _M is the max usable lambda value. It should be = _MaxLevel - BaseLevel. If you're looking at equation 3.21 in the 1.2 spec, then _M = q - b. I should probably rename that variable too (_MaxLambda). The incoming lambda value is added to BaseLevel to select a mipmap level. The idea is that lambda=0 will correspond to the BaseLevel texture and lambda = _M will correspond to the GL_MAX_LEVEL texture. I'm not sure why you're seeing blurry images. I haven't tried running UT with 3.5 yet. -Brian |