tags:

views:

34

answers:

1

I want to display a textured quad that has its texture uninterfered. As I have it now, my program creates a texture of dimensions 32x32 and loads a texture into it. I created a vertex buffer with a FVF of D3DFVF_XYZRHW and D3DFVF_TEX1, and 4 vertices that make up a 32x32 quad. At first glance when it displays it looks fine, but the problem is when I adjust the vertices to make the texture move, it appears that when the texture is located at certain spots, some of the texture's pixels become distorted. I'm guessing that Direct3D is doing this thinking that my texture is meant for 3D graphics when it's meant to be displayed as it is. What can I do to make Direct3D not interfere with my textured quad?

I know of ID3DXSprite, however I'm choosing to not use it.

Original texture: http://i54.tinypic.com/2arko0.jpg
Program screenshot: http://i55.tinypic.com/2h7kimw.jpg

A: 

Do you add a half texel offset to the UV's?

Try adding 1/64 to each of the UV coordinates. This will probably solve your issue.

Goz