Sign in to follow this  

Discontinuity of Texture Mapping

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

This topic is 3147 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this