Work towards doing transformations using uniforms
This commit is contained in:
@@ -5,6 +5,8 @@ in vec4 vParams [];
|
||||
in vec2 vWinSize [];
|
||||
out vec2 gTexPos;
|
||||
|
||||
uniform vec2 translation;
|
||||
|
||||
vec2 rotBy( float rot, vec2 v)
|
||||
{
|
||||
return vec2 ( v.x * cos(rot) - v.y * sin(rot)
|
||||
@@ -15,7 +17,7 @@ vec2 rotBy( float rot, vec2 v)
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 cPos = vec2(vParams[0].x / 250 , vParams[0].y /250 );
|
||||
vec2 cPos = vec2(translation.x / 250 , translation.y /250 );
|
||||
float zoom = vParams[0].w;
|
||||
float rot = 0 - vParams[0].z;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user