PDA

View Full Version : Textures without blur



Prevenge
03-05-2012, 11:27 AM
I am making a simple 3D game engine and most of it works just fine, but I am not satisfied with the way the textures get blurry when they are rendered. After some searching it seems that the advice a lot of people give on this subject is to have the texture the same size as the object. However, I am using somewhat small textures 32x32 or 64x64, even for large objects in the game. I don't mind having enlarged pixels, I just don't want the textures to be blurry. So, my question is, how do I apply a texture to an object while still keeping it sharp and not blurry.

menzel
03-05-2012, 11:33 AM
After binding the texture, set the magnification filter to nearest:

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );

That and the tiny textures should give your game more 'oldscool' or mindcraft look if that's what you're looking for.

Prevenge
03-05-2012, 12:33 PM
Exactly what I was looking for. Thank you!