SOF/renderer/shaders/ui-pane.vert
FroggyGreen 1ec76f56c8 Instancing
The renderer now allows instancing. The way this works is by having to
vertex buffers. One contains the normal vertex geometry data, the other
contains per-instance data.
2024-05-09 16:39:50 -05:00

19 lines
406 B
GLSL

#version 460
// vertex geometry data
layout(location = 0) in vec2 inPos;
// instance data
layout(location = 1) in vec2 inInstancePos;
layout(location = 2) in vec2 inInstanceScale;
layout(location = 3) in vec4 inInstanceColor;
layout(location = 0) out vec4 fragColor;
void main()
{
vec2 pos = inPos * inInstanceScale + inInstancePos;
gl_Position = vec4(pos, 0.0, 1.0);
fragColor = inInstanceColor;
}