Jump to content
  • Advertisement
Sign in to follow this  

Texture atlas and mipmap problem.

This topic is 4268 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 all, I'm doing some tests on texture splatting for terrains using a Texture atlas, which stores the different ground types. The rendering goes fine, but the mipmapping gives me a headache. Let me explain my situation: each ground type is tiled across the terrain (wrap address mode, scaled and biased in the pixelshader to sample the atlas correctly and support texture filtering), though seams are visible between the tiles (only when mipmapping is enabled though). I think I understand why this happens: at the border of each "wrap" the texture coordinates go from 0.99999f to 0.00001f, which is a huge jump and the lowest mipmap is thus sampled for that texel. When I give the lowest mipmap in my texture an explicit color (like, red), then you can clearly see that it is the lowest mipmap that peaks through the tiles. I read the article in Shader X3 on using texture atlasses, and there the author calculates the ddx and ddy of the texture coordinates and uses these in the HLSL "tex2D"-instruction to aid in sampling the correct mipmap. This indeed solves the mipmap problem, but it really hurts the framerate (almost 1/3 less on a nVidia 7800 GT card). Is there any reason why this goes so slow? Perhaps someone here has experience using texture atlasses and knows another way of solving the mipmap problem? Thanks a lot in advance!

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!