bettola/assets/shaders/shape.vert
Ritchie Cunningham d37f632344 [Refactor] Implement batched shape rendering.
This mirrors the previous refactor of the TextRenderer. All calls to
draw_rect and draw_triangle now buffer vertex data (position and color).
A begin()/flush() system is introduced to manage batching.
2025-10-05 00:44:23 +01:00

13 lines
237 B
GLSL

#version 330 core
layout (location = 0) in vec2 aPos;
layout (location = 1) in vec3 aColor;
uniform mat4 projection;
out vec3 ourColor;
void main() {
gl_Position = projection * vec4(aPos.x, aPos.y, 0.0, 1.0);
ourColor = aColor;
}