PDA

View Full Version : Mipmapping and MultiTexturing



bensta00
07-06-2004, 09:30 AM
Hi, I'm trying to take a 512x512 texture, automatically generate mipmaps down to about 32x32 size, then render a plane with each mipmap level blended onto the plane. The effect would be taking an image and blending it with lower resolution versions of the image.

Is there any way to choose the mipmapping bias and then apply this to a multitexturing unit of its own?

e.g.

glActiveTexture(GL_TEXTURE0);
assignTexture(myTexture, biasOf1);
glActiveTexture(GL_TEXTURE1);
assignTexture(myTexture, biasOf2);

etc...

Then multitexture each GL_TEXTURE together?? Any advice would be great, I may be going about this totally wrong!

Thanks for your time!

Ben

CrazyButcher
07-06-2004, 12:46 PM
straight from gdc2k_ogl_extensions.pdf:

EXT_texture_lod_bias
Controls mipmap level-of-detail
Increasing the per-texture LOD bias causes
can improve texturing performance
extra texture blurring (decreasing causes over-sharpening)
Exactly like Direct3Ds texture LOD bias functionality
Bias is a floating-point number; 1.0 is up one mipmap level
glTexParameterf(GL_TEXTURE_FILTER_CONTROL_EXT,
GL_TEXTURE_LOD_BIAS_EXT, 0.25);
EXT_texture_lod_bias

Tom Nuydens
07-07-2004, 12:09 AM
That should be glTexEnvf(), not glTexParameterf().

-- Tom

bensta00
07-07-2004, 04:54 AM
Thanks for your help, that's great!

Ben.