Help - my pixel-perfect quads are blurry

Blitz3D Forums/Blitz3D Beginners Area/Help - my pixel-perfect quads are blurry

octothorpe(Posted 2005) [#1]
My add_quad() function should draw a section of my image similarly to how DrawImageRect() works. It seems that the quad shows up occupying the correct pixels on the screen, but the image is blurry. My UV math (+.5 to all) is pretty much guesswork, but no amount of experimentation has produced a clear image.



Any help is greatly appreciated!


Dock(Posted 2005) [#2]
I'm not sure if this is the right solution, but have you tried ClearTextureFilters to remove mipmapping?

http://www.blitzbasic.com/b3ddocs/command.php?name=ClearTextureFilters&ref=3d_a-z


Shifty Geezer(Posted 2005) [#3]
Scaling of non-power-of-2 textures often results in blurry images. Most GPU cards have to store and work with power-of-2 image (128x128, 256x256, 256x64, 128x512). Anything larger than one size uses the next size up, so 640x640 needs a 1024x1024 texture to fit it.

I've not looked closely at your code but try a 256x256 bmp first and see what that's like.


octothorpe(Posted 2005) [#4]
The pizza trophy goes to Shifty Geezer! That fixed it, thanks!

Removing mipmapping reduced the blur by a considerable amount, but there was still a tiny bit. Using a 256x256 source image removed the blur completely, even with mipmapping still enabled. Now my sprites are as crisp as the day they were drawn in mspaint.exe!

Now I understand the reason for the "; load squared texture" code in http://www.blitzbasic.com/codearcs/codearcs.php?code=773

Thanks to both of you!