I have sprites and dynamic lights that are passed into a shader as uniforms. Kind of,

Code :
/* 1.10 fragment shader */
 
#define MAX_LIGHTS 64
#define AMBIENT 0.08
 
uniform int number_of_lights;
uniform vec2 world_space_light_position[MAX_LIGHTS];
 
void main() {
	vec3 shade = vec3(AMBIENT);
	for(int i = 0; i < MAX_LIGHTS; i++) {
		if(i < number_of_lights) {
			vec2 relative_light_position = world_space_light_position[i] - gl_ModelViewMatrix[3].xy;
			shade += vec3(1.0 / (length(relative_light_position) + 1.0));
		} else {
			break;
		}
	}
	gl_FragColor = vec4(shade, 1.0);
}

I want to move my camera around now but my lights are just ignoring camera movement. I think it's gl_ModelViewMatrix[3].xy that's the problem; I want the world coordinates of the sprite.