Jump to content
  • Advertisement
Sign in to follow this  
dzzunga

Discontinuity of Texture Mapping

This topic is 3424 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

Hi All, My application uses DirectX 9 to render trapezoid and fill it with texture, but the texture mapping result is undesired, there are some discontinuities between 2 triangles. This is some thing like only Affine mapping, not Perspective Correction, but this is pure 2D rendering and i have no depth(z) for trapezoid geometry. Please take a look at image : http://s186.photobucket.com/albums/x162/dzzunga/?action=view¤t=trapezoid_mapping.jpg Does anybody have any idea how to set DirectX to work properly in this case ? I greatly appreciate your kindness.

Share this post


Link to post
Share on other sites
Advertisement
I can't get the image to load, and hence can't see what the issue is that you are having. Do you have anywhere else that you could upload the image to?

Share this post


Link to post
Share on other sites
Quote:
Original post by dzzunga
Dear Jason,

Please click the link to see image


What texture coord are you using for the vertex at the top left of your poly? You probably want to offset the X coord into the texture a bit.

Share this post


Link to post
Share on other sites
Hi Kath,

Texture coord of the top left vertex of my poly is :
u = (float)(point1.x)/(Texture Width);
v = 0;

top right:
u = (float)(point2.x)/(Texture Width);
v = 0;

bottom left:
u = 0;
v = 1.0f;

bottom right:
u = 1.0f;
v = 1.0f;

Share this post


Link to post
Share on other sites
Are you using shaders to sample the texture, or are you using fixed function rendering? If using shaders, you might want to post the shader code so we could take a look for anything strange. I've seen those types of artifacts when 3 component vectors get normalized as 4 component vectors and so on.

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!