Jump to content
  • Advertisement
Sign in to follow this  

Problem with UV-Coord

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

Hey Guys,
I've run into some problems regarding the textures in a Direct3D-Application.
For the sake of simplicity I'm using a surface which contains 4 vertices and 6 indices.
The surface is built with 2 triangles. The exact coordinates of the two triangles can be found here: http://gyazo.com/2b9...8179f3a8e95063d / http://gyazo.com/9b6...a5791bd547c93ce
I can't make out any mistakes concerning the position-coordinates and UV-coordinates (at a first glance).
This is the Texture I'm using: http://gyazo.com/12d...2f7cada915f3b3e
Let's get to my Question: Why is the pixel-shader mapping the texture like this? http://gyazo.com/1de...4aeb5c0713c2729
I'm suspecting the UV-Coordinates because they are most likely causing my problem.
What do you think? I would be very happy to read a few suggestions regarding my problem solution.

Share this post

Link to post
Share on other sites
Your UV's are incorrect. You probably just want to set them up such that (0, 0) is the top left and (1, 1) is the bottom right. So the UV's for your vertices should be

(1, 1)
(0, 1)
(1, 0)
(0, 0)

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!