Advertisement

OpenGL texture very pixelated from sides

Started by July 03, 2018 09:59 PM
3 comments, last by novus22 6 years, 5 months ago

I'm very new to OpenGL and graphics programming, and there is probably a simple answer to this. I've made a function that defines a grid and used it to make the "ground" of my game.

I added the textures, which have a diffuse, specular, and normal map. When viewed closely the textures look fine

image.thumb.png.e71bb810b57f85d90842834e6e24bb54.png

 

However, from the side they look very pixelated

image.thumb.png.ab4c2bd0cd0f57bb040abfad8334fbec.png

I would appreciate if someone points me in the right direction as to how to handle this problem, as since i'm a beginner i'm not quite sure what's causing it. I'm not sure if they'd help but the texture params i'm using are: GL_LINEAR_MIPMAP_LINEAR for min filter, GL_LINEAR for mag filter, and i'm using openGL to generate the mipmaps (glGenerateMipmap). Thanks again

assuming all your mipmaps are correct... are you setting the magnification AND minification filters? after that, and when you get correct trilinear filtering, you can enable anisotropic filtering for improved clarity. It seems to me than only the magnification filter while the minification is still point filtered in your picture.

Advertisement

Hey Jihodg

I have set the minifcation and magnification filters set to GL_LINEAR_MIPMAP_LINEAR and GL_LINEAR respectfully. For the mipmaps i'm using glGenerateMipmaps(). How would one set up anisotropic filtering? I'm using OpenGL 3.3 

Ah, nevermind, I used the extension and implemented anisotropic filtering. It all looks better now. Thanks!

This topic is closed to new replies.

Advertisement