cub3d/assets/shaders/vert.glsl
Quinten Mennen 5a17615729 shaderss
2025-05-22 18:39:22 +02:00

16 lines
328 B
GLSL

#version 330 core
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec2 aTexCoord;
layout(location = 2) in int aTexIndex;
out vec2 TexCoord;
flat out int TexIndex;
uniform mat4 ProjMatrix;
void main()
{
// Add view bobbing
gl_Position = ProjMatrix * vec4(aPos, 1.0);
TexCoord = aTexCoord;
TexIndex = aTexIndex;
}