Angles and rotation in GLSL
Zero starts from the right axis, positive rotation is clockwise. If we do fract(atan(y, x))
on the translated UV, we’ll get this:
Matrix multiplication. See also this and this.
To summarize, if you want to apply matrix to a vector, you write it in this order, like in good ol’ math:
|
|
You can also write it in reverse order, but that will multiply by a transposed matrix. Sadly, some_vec *= matrix
will do exactly that.
# So, how to rotate something in GLSL?
|
|