Sign in to follow this  
jdub

Anti-aliasing 2D textures in XNA

Recommended Posts

The easiest way is to use gimp or photoshop to trim the edges of the texture. This way you don't need to enable FSAA.
An example using OpenGL can be found here:
http://www.cairographics.org/OpenGL/


You don't need to use cairo or look at the opengl code, just download the sample and look at zebra.png and zebra-trimmed.png. (You need to use texture formats that support alpha channel and enable alpha blending in XNA )

[Edited by - Kambiz on August 17, 2008 2:51:01 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by jdub
Hmmm I have never heard of filtering. What I was wanting was to make it so that my textures do not have such sharp pixelated edges.


Okay, you did mean anti-aliasing, but to be clear, anti-aliasing works on triangles and such. The fact that you have a texture instead of a simple color on those triangles does not matter.

To anti-alias primitives rendered to the backbuffer, you need to set the multisampling to something other than NONE when creating or resetting the device. The higher the quality, the more anti-aliasing is done, simply put.

Share this post


Link to post
Share on other sites

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