I began to tackle shaders and although I can understand the concept through the examples very well, I got stuck understanding the logic behind the swirl shader.

shader*type canvas*item;

uniform float rotation=3.0;

```
void fragment() {
vec2 uv = SCREEN_UV;
vec2 rel = uv-vec2(0.5,0.5);
float angle = length(rel)*rotation;
mat2 rot = mat2(vec2(cos(angle),-sin(angle)),vec2(sin(angle),cos(angle)));
rel = rot * rel;
uv = clamp(rel + vec2(0.5,0.5),vec2(0,0),vec2(1,1));
COLOR.rgb= textureLod(SCREEN_TEXTURE,uv,0.0).rgb;
}
```

First of all, why does the product of a 2x2 matrix and a Vector2 return a Vector2, makes very little sense to me, since I expected the returned value to be a 2x2 matrix. Second, I have a hard time understanding the angle and rotation matrix calculation itself. Could somebody maybe explain this a little?

Thanks!