From 8832441dd75848cac5c105097396ffb34343c5cb Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 10 Oct 2012 18:16:20 -0700 Subject: Do angle addition --- data/angle_addition.vert | 6 ++++-- 1 file 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.; -- cgit v1.2.3