Sign in to follow this  

Texture atlases & texture bleeding

This topic is 2485 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

I'm trying out texture atlases, but i'm stuck at one last issue.. The texture clamping is not useable tool to stop textures from bleeding from one to another or into surrounding pixels of the texture - what do you people do solve this problem with texture atlases?

Share this post


Link to post
Share on other sites
How much does it need? is there any optimal range on how many pixels get interpolated and this is standard across all hardware?

I'd really hate to have to fix this later on during development.. is there no better way? with this i'd lose a lot of empty space between textures..

Share this post


Link to post
Share on other sites
I would think just one blank pixel border should be sufficient for just a regular image, though it wouldn't work well with mipmapping. Maybe you could just program in a variable border so it doesn't come and bite you later if you find you need more.

Share this post


Link to post
Share on other sites
It's a tricky problem - this is the best solution I've seen and requires doubling the size of your textures: [url="http://www.ogre3d.org/forums/viewtopic.php?f=4&t=61602"]http://www.ogre3d.or...php?f=4&t=61602[/url]

Share this post


Link to post
Share on other sites
Well that really depends on your application. If you have an application with lots of different and small textures, and when profiling you identify that texture switching/access is a bottleneck, then yes it can be worth it.

Also be aware that on DirectX 10/11 hardware you can use texture [i]arrays[/i], which solve all the bleeding problems for you.

Share this post


Link to post
Share on other sites
The amount of padding you need depends on exactly how you use the texture in your application.
[list][*]For bilinear filtering, you need a border of one pixel[*]For anisotropic filtering, you need as large a border as half the degree of anisotropy[*]For DXT/BC compression, you need these same borders rounded up to block size of 4 pixels[*]For mipmaps, you need these same borders on every mip level[/list]
The last one is the killer, because a border on a lower mip level implies twice as large a border on the next higher mip level.

Share this post


Link to post
Share on other sites
You can try reading this too:

ShaderX3: advanced rendering with DirectX and OpenGL

There is an article on texture atlases. You can also find it on Google books, although I'm not sure this link works:

http://books.google.com/books?id=DgMSb_10l7IC&pg=PA165&lpg=PA165&dq=texture+atlas+bleeding+bilinear+filter&source=bl&ots=-mv97kXpvK&sig=VlSDnteENJe_WVTk6nqVBfs_244&hl=en&ei=cOtiTdqIH4aosAOKiO26CA&sa=X&oi=book_result&ct=result&resnum=3&ved=0CCgQ6AEwAg#v=onepage&q&f=false

Share this post


Link to post
Share on other sites

This topic is 2485 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this