- Home /
How to set S, T, R, Q texture coordinates?
Is there a way to set the thrid and fourth texture component of a vertex? I only find Mesh-uv which is a Vector2
.
Both extra components are needed for perspective texture mapping, found in this cool tutorial
OpenGL can do this. Take a look at glTexCoord4f(s, t, r, q)
Comment
Best Answer
Answer by Bunny83 · May 11, 2016 at 08:40 PM
In the recent past there was no way of specifing more than two component texture coordinates. However Unity added explicit getter and setter methods:
Those two methods come with 3 overloads for using Vector2 / Vector3 / Vector4 arrays