Sign in to follow this  

Sprite rotation issues

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

With GL_TEXTURE_MIN_FILTER and GL_TEXTURE_MAG_FILTER set to GL_LINEAR, my sprites have graphics artifacts around the edges when rotated (I assume due to the alpha channel being filtered), and they look like this: Image Hosted by ImageShack.us Switching to nearest pixel filtering fixes this (but makes it look aliased) which is why I am assuming it is the alpha values being filtered around the edges. Does anyone have any further insight or suggestions on how I can get around this? Thanks.

Share this post


Link to post
Share on other sites
I figured out a solution by setting glAlphaFunc to GL_GREATER with a certain value when I am drawing my sprites. I am having to switch back to GL_ALWAYS after the sprites are drawn, so that the graphics that require lots of alpha settings (particles etc.) are not affected. So far it doesn't seem that calling glAlphaFunc so often has a large overhead, so hopefully it works :)

Share this post


Link to post
Share on other sites
You might want to try premultipled alpha, it should help reduce the filtering problems; see the first paragraph of "Better compression" here:
http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BPremultiplied%20alpha%5D%5D

Share this post


Link to post
Share on other sites

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