Dairy-Drift/resources/shaders/plane/shader.vert

23 lines
509 B
GLSL
Raw Permalink Normal View History

2023-03-31 11:27:31 +02:00
#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
2023-04-05 11:17:42 +02:00
v_texcoord = texcoord;
2023-03-31 11:27:31 +02:00
}