Jump to content
  • Advertisement
Sign in to follow this  
MysticSheik

Antialiasing when zooming?

This topic is 1163 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!

 

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
Advertisement

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
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!