#version 330 core layout(location = 0) in vec3 position; layout(location = 1) in vec2 texcoord; out vec2 v_texcoord; uniform mat4 model; uniform mat4 view; uniform mat4 projection; uniform float tile_size; uniform float scroll_speed; uniform vec3 camera_position; void main() { // Apply the model, view, and projection matrices gl_Position = projection * view * model * vec4(position, 1.0); // Calculate the texture coordinate offset based on the camera position v_texcoord = texcoord; }