Files
glsl_playground/utilities/translation.glsl

9 lines
148 B
GLSL

mat2 rotate2d(float a) {
float c = cos(a);
return mat2(c, -sin(a), sin(a), c);
}
mat2 scale(vec2 s) {
return mat2(s.x, 0., 0., s.y);
}