(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
vec2 rotateUV(vec2 uv, float rotation) | |
{ | |
float mid = 0.5; | |
return vec2( | |
cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid, | |
cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid | |
); | |
} | |
vec2 rotateUV(vec2 uv, float rotation, vec2 mid) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.