View Full Version : Easy question...What is bias param in textureXD?
10-06-2006, 11:43 PM
As the heading says, I'm wondering what the bias parameter of textureXD is for? I can't seem to find any documentation for it.
10-07-2006, 01:46 AM
If you have mipmaps then GPU automatically selects one of mipmap when applying texture to polygon. Bias parameter can offset the mipmap number.
If bias is 0.0 then current mipmap is used.
If bias is 1.0 then smaller bitmap is used.
If bias is -1.0 then larger mipmap is used.
Of course values like 0.5 or -3.5 are also allowed.
A little performance hint - calling texture2D with bias specified (even if it's 0.0) is much slower than calling texture2D without bias. This is true on GeForce6 - I'm not sure about other GPU's.
10-09-2006, 01:30 PM
This seems usefull for reflective surfaces that have have varying reflection sharpness/blurriness.
Slightly off topic:
Is there a way to 'clamp' the mipmap level of a texture (without using shaders)?
Say you have a 256x256 mipmapped texture, can you set a fixed max mipmap level so under all circumstances colors are sampled from level 2 (64x64) or lower, but not higher levels?
10-09-2006, 01:56 PM
Originally posted by remdul:
Say you have a 256x256 mipmapped texture, can you set a fixed max mipmap level so under all circumstances colors are sampled from level 2 (64x64) or lower, but not higher levels? Look at the GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_MIN_LOD and GL_TEXTURE_MAX_LOD texture parameters. I do not know however, if they are hw accelerated.
10-09-2006, 03:48 PM
Thanks, yes I was looking for those.
GL_TEXTURE_MIN_LOD does the trick.
All are fully hw accelerated on a GeForce 6200.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.