Jump to content
  • Advertisement
Sign in to follow this  
rukiruki

Wonky texture in Polygon directx9

This topic is 1950 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My rendering seems great and fine so far, except when I try to render a texture to a polygon (typically 4 vertices as a triangle list).

The texture is a very simple colourful rectangle:
[attachment=15788:001.png]

The above image is saved inside a 1024x1024 texture, so the Power of 2 is not an issue.

I render to a quad with an elongated bottom, and the centre of the texture get's a bit biased and wonky towards the left hand side, shown in the following image:
[attachment=15789:result.jpg]


I need the texture to be rendered evenly throughout the polygon, I need the following photoshopped picture as a result:
[attachment=15790:desiredresult.jpg]



I looked at PIX of the frame and the triangles are being rendered with the correct UV and vertices values
[attachment=15791:pix.jpg]

So I don't really know why it is skewing slightly to the left down the centre. Is it because of the triangle split down the diagonal of the polygon? Do I need to enable a blending method or something?

Share this post


Link to post
Share on other sites
Advertisement

try it on a different quad. make one right quick in a modeler, or just write a few lines of code to set a buffer of 6 vertices and indices.

 

something simple like a 1x1 quad with the LL (SW) corner at the origin.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!