I need to replicate the following CSS transformations in a vertex shader :
width
/height
: Should correspond towidthUniform / meshResUniform
.scaleX / scaleY
translateX / translateY / translateZ
rotateX / rotateY / rotateZ
skewX / skewY
I want to follow GSAP’s transform order, which matches CSS:
translate(XYZ) → rotateZ → rotateY → rotateX → skew(XY) → scale(XY)
However, since matrix transformations are applied in reverse order in shaders, do I need to invert this order when implementing it ?
Also, where should the width
and height
transformations be placed in the chain ? I’m not sure how to incorporate them correctly.
Any guidance would be appreciated !