#version 430 layout (location = 0) in vec2 pos; layout (location = 1) in vec2 tex; layout (location = 2) in vec4 vertexColor; layout (binding = 0) uniform sampler2D samp; uniform mat4 matrix; uniform vec2 camera; uniform float depth; uniform vec3 ambientLight; struct Light { vec2 pos; float strength; vec3 color; }; uniform Light lights[32]; uniform bool useTexture; uniform bool useLight; uniform bool useCameraOffset; out vec2 tc; out vec2 loc; out vec4 vColor; void main(void) { loc = pos; if(useCameraOffset) { gl_Position = matrix * vec4(pos - camera, depth, 1.0); } else { gl_Position = matrix * vec4(pos, depth, 1.0); } tc = tex; vColor = vertexColor; }