Sign in to follow this  

Problem with UV-Coord

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: [url=""][/url] / [url=""][/url]
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: [url=""][/url]
Let's get to my Question: Why is the pixel-shader mapping the texture like this? [url=""][/url]
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
Thank you, it works with your UV-Setup.
Unfortunately i don't understand your solution process.
Could you maybe tell me why blender is using these coordinates for a non-triangular surface? [url=""][/url]

Share this post

Link to post
Share on other sites

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