Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Damon Clavuis

Blurry Textures

This topic is 6590 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''ve being working with OpenGL for a few months now and the one thing I have never got around to is why the textures seem blurry. Even when you paste the texture over a polygon the same pixel dimensions as the texture it is still not sharp looking. Is there a filter that you can apply (or not apply) when loading the texture that has an effect on this? I understand you would get some blur when stretching or shrinking a texture to place it on an object but why does every thing look smokey? Thanks

Share this post


Link to post
Share on other sites
Advertisement
This is what we call "Texture Filtering". It is designed to make the textures look less blocky when stretched and preserve their colours when shrunk. There should be some sort of command to change the texture filtering, and the sort of filtering which doesn''t blur is called "Point Filtering".



Please state the nature of the debugging emergency.


sharewaregames.20m.com

Share this post


Link to post
Share on other sites
When you load your texture you are most likely specifying some texture parameters, something like glTexParameteri(whatever). If you aren''t look into it

However, basically there are several filters that can be applied,
GL_LINEAR and GL_NEAREST spring to mind. GL_NEAREST is quite low quality, and is very pixelated at times, GL_LINEAR is very smooth and quite good looking.

Incase you were wondering, apply texture filters something like this:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

Hope that helped.

-Mezz

Share this post


Link to post
Share on other sites
GL_NEAREST is no filtering. GL_LINEAR does bilinear filtering and will smooth out anything you care to give it

Share this post


Link to post
Share on other sites

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