Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualKaptein

Posted 19 November 2013 - 12:22 AM

Thank you smile.png

 

What are the UV quads relative to?
If I provided a quad's verticies between -1 and 1 couldn't I use them again for the UV if it's relative to the screen

or -1 and 1 if it's relative to the quad.

UVs are texture coordinates, between 0 and 1, unless the texture repeats, always smile.png

Of course there are lots of variations on how people specify these coordinates due to eg. texture atlasing.

But, what I did in my example was simply scaling the vertex coordinates [-1, 1] to [0, 1] so that you could re-use the vertex coordinates for a fullscreen quad. Those UVs represent the entire texture.

 

To answer your question - yes, but you still need to rescale the UVs to match the [0, 1] scale of texture coordinates.


#1Kaptein

Posted 19 November 2013 - 12:21 AM

Thank you smile.png

 

What are the UV quads relative to?
If I provided a quad's verticies between -1 and 1 couldn't I use them again for the UV if it's relative to the screen

or -1 and 1 if it's relative to the quad.

UVs are texture coordinates, between 0 and 1, unless the texture repeats, always :)

Of course there are lots of variations on how people specify these coordinates due to eg. texture atlasing.

But, what I did in my example was simply scaling the vertex coordinates [-1, 1] to [0, 1] so that you could re-use the vertex coordinates for a fullscreen quad. Those UVs represent the entire texture.


PARTNERS