Page 1 of 1

Loading images and getting "distorted"

Posted: Thu Jul 30, 2009 1:49 pm
by turconi
I created a .png image and when I load it, gets "distorted"...likes it loss quality while loading .png image...

I'm using Irrlicht of SVN (and I tried with Irrlicht 1.5) and using Direct3D9 driver.

Original image:
Image
Displayed image:
Image

Edit:
This occurs with Direct3D9 and OpenGL. With "Software" the transparent border doesn't work. But I want to use it with Direct3D9 because performance is best...

Posted: Thu Jul 30, 2009 2:37 pm
by hybrid
This is probably due to the dimensions of the image not being power of two (e.g. 64x256). If your hardware doesn't support NPOT textures the image is scaled to a power of two. This can lead to some artifacts. Better add some transparent border to the image to get it into proper dimensions.

Posted: Thu Jul 30, 2009 2:43 pm
by turconi
Thanks hybrid, I will try to let it in "power of two".

So, the problem is in MY hardware? And, in any other computer that suports NPOT textures will show the "correct image"?

Soon I edit this post saying if it worked or not.


EDIT:
It worked :D, thanks a lot hibryd!

Posted: Thu Jul 30, 2009 9:28 pm
by B@z
yeah there are some graphic cards what support NPOT, and that shows good.
for example in my game, i used NPOT textures a lot but wasnt wrong a bit in my computer.
then i tried out at other computer, and it looked awful xD
from that i decided to use POT textures xD