Hi Guys,

Now that I understand fragment shaders (to a reasonable degree), it is time for me to move on to vertex shaders

So, now I am playing with a basic vertex shader and focusing on this line (along with a 256 x 256 solid colour spite, so we are on the same page).

vec4 object_space_pos=vec4(in_Position.x,in_Position.y,in_Position.z,1.0);

Adding and subtracting numbers to in_Position.n let's you move the object around simply enough.

What if you wanted to skew the sprite? For example, have the top of the quad stay where it is but move the bottom of the quad to turn it into a parallelogram?

How would you go about doing something like this?