Hi could anyone help me solving the problem of blurred texures? My viewport screen have 800px of height and 480-600px (for different aspect ratios) of width and when I test game on smartphone with bigger screen the textures, buttons and the text are so blurry, even if I use Linear texture filter. How can I get rid of that? What can possibly solve my problems?
1 Answer
It's hard to know what's going on without images or code so not sure if this addresses your particular issue or not, but 'Linear' in this context means that OpenGL applies a bilinear filter to the texture when it is sampled.
A bilinear filter is an average of the pixels from the original image around the sample position so you may get slightly blurry result depending on the image's original size and how it is scaled.
If you do not want your textures to be filtered in that way, you should apply the Nearest texture filter mode which just picks whichever pixel from the original image is closest to the requested sample position and draws that instead of trying to be clever about it. (This is what gives games like Minecraft their distinctive 'chunky pixel' look in its textures)
Here's the difference on a small image that has been scaled up:
(nearest neighbor, bilinear, bicubic [not directly supported in OpenGL])
Hope that helps!