precision highp float; attribute vec3 player; attribute vec2 texuv; varying vec2 textureuv; attribute vec4 lamp1; //vec3 position, float strength attribute vec4 lamp2; attribute vec4 lamp3; // max 3 lamps per shaded player uniform float time; //used for noise uniform float world_x; uniform float world_y; uniform float dir; uniform mat4 MV; uniform mat4 P; void main() { textureuv=texuv; mat2 rotate = mat2( cos(dir), -sin(dir), sin(dir), cos(dir) ); vec2 world = vec2(world_x, world_y); vec2 local = (player.xy - world) * rotate; gl_Position = P * MV * vec4(local.xy, -2, 1.0); }