diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/angle_addition.vert | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/data/angle_addition.vert b/data/angle_addition.vert index f410305..72d745e 100644 --- a/data/angle_addition.vert +++ b/data/angle_addition.vert @@ -5,8 +5,10 @@ uniform float rotation_angle; void main() { - gl_Position.x = z.x; - gl_Position.y = z.y; + float x = z.x * cos(z.y); + float y = z.x * sin(z.y); + gl_Position.x = x * cos(rotation_angle) - y * sin(rotation_angle); + gl_Position.y = x * sin(rotation_angle) + y * cos(rotation_angle); gl_Position.z = 0.; gl_Position.w = 1.; gl_PointSize = 32.; |