Jump to content
  • Advertisement
Sign in to follow this  
Clapfoot

Vertex texture fetch & mipmaps

This topic is 3756 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I've been playing around with vertex texture fetch and I've been able to read all sorts of textures from my GLSL vertex shader (3d textures, cube maps, etc).. but I can't seem to read mipmap levels other than the base. For e.g. In my vertex shader, when I do texture2Dlod(testSampler, gl_MultiTexCoord0.xy, 0.0) the value read corresponds to the mipmap at level 0, but when I do texture2Dlod(testSampler, gl_MultiTexCoord0.xy, 1.0), the value read still corresponds to the level 0 mipmap instead of level 1. In this example, the texture object I have attached to testSampler has 2 mipmaps ... 256x256 at mipmap level 0 and 128x128 at mipmap level 1. I've left all the texture parameters to their defaults (min/mag filters are at GL_NEAREST, but since we are directly specifying the lod .. i'm assuming this shouldn't matter.. and i've tried GL_NEAREST_MIPMAP_NEAREST as well for good measure) Is there anything other setup, etc that needs to be done that i'm missing? Thanks

Share this post


Link to post
Share on other sites
Advertisement
The only document I've seen is one from nVidia about their Gf 6800. It supports 2D texture, GL_RGBAF32_ARB and GL_LUMINANCE32_ARB in hardware. Everything else is software emulated.
I guess you found a bug, you should mention the hw you have and driver and perhaps some people here can test.

Share this post


Link to post
Share on other sites
This shouldn't be a bug since i'd imagine its a pretty fundamental feature of vertex texture fetch. I'm running on an 8800 GT. Any other suggestions?

Share this post


Link to post
Share on other sites
YOu only have two mipmaps in the chain? You need to make them all the way down to 1x1. If you are using glGenerateMipmapEXT I found a bug in certain situations with Nvidia hardware and they are supposed to update this bug next release..., but not sure if that is applicable here. I would try and use GL_GENERATE_MIPAMPS and see if that works.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!