Sign in to follow this  
MysticSheik

Antialiasing when zooming?

Recommended Posts

MysticSheik    108

Hi!

 

I'm currently having an issue with zooming in on a 2D tilemap like this:

 

http://imgur.com/a/OtdVD

 

and ideally it should look like this:

 

http://imgur.com/GlXS9Th

 

I don't know what causes the blurriness or the lines, but it seems like something related with either antialiasing or the camera/projection matrix. I will be happy to provide the code behind this, but I don't really know what parts of the code to show, because I don't know for sure where the issue lies.

 

 

 

Share this post


Link to post
Share on other sites
Erik Rufelt    5901

Use GL_NEAREST instead of GL_LINEAR for your texture-filtering.

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)

 

You may also want to set GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T to GL_CLAMP_TO_EDGE.

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