Texture sharpness and anisotropy

BlitzMax Forums/BlitzMax Beginners Area/Texture sharpness and anisotropy

Mikorians(Posted 2012) [#1]
I am 1 feature away from having it all.
How do I obtain an entity that doesn't show a blurry texture?
I wanna see those square pixels.
It's for a sign.


Kryzon(Posted 2012) [#2]
What are you using?
by saying 'entity' I presume you're using miniB3D or something similar, but it's still vague.

It will depend on what solution or API you're using. In any case, you get pixelation by setting a NEAREST-NEIGHBOUR filtering mode for both magnified and minified texture sampling.

In OpenGL:
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST_MIPMAP_LINEAR)
(More info on Texture Filtering)


Mikorians(Posted 2012) [#3]
DirectX man, myself

Found total solution to problem that I was able to adapt:

http://lunamedia.heim.at/files/AnistropicFilter.zip

Nifty thing is--- It exposes all the anisotropy settings for your pleasure!
Possibly exposing some of directx7 too!


Kryzon(Posted 2012) [#4]
Ah, I see.
We've used a DLL like that in Blitz3D before, check this thread: http://blitzbasic.com/Community/posts.php?topic=95702

It might even be the same one; it's been renamed and repackaged several times before.


GW(Posted 2012) [#5]
When you load the image, just set the flags to 0