gearlib-cpp/examples/assets/texture.vert
2024-05-16 22:37:46 +12:00

28 lines
576 B
GLSL

#version 460 core
layout(location = 0) in vec3 a_Position;
layout(location = 1) in vec4 a_Tint;
layout(location = 2) in vec2 a_TexCoord;
layout(location = 3) in float a_TexID;
struct VertexOutput {
vec4 Tint;
vec2 TexCoord;
};
layout(location = 0) out VertexOutput Output;
layout(location = 2) out flat float TexID;
layout(std140, binding = 0) uniform Camera {
mat4 view;
mat4 projection;
};
void main() {
Output.Tint = a_Tint;
Output.TexCoord = a_TexCoord;
TexID = a_TexID;
gl_Position = projection * view * vec4(a_Position, 1.0);
}