radar-gi/shaders/font.vert
2024-08-14 17:05:06 +08:00

28 lines
520 B
GLSL

layout(location = 0) in vec3 input_position;
layout(location = 1) in vec2 texcoord;
uniform vec2 atlas_shape;
out float v_scale;
out vec2 v_texCoord;
out vec4 v_color;
const vec2 verts[4] = vec2[4](
vec2(-0.5f, 0.5f),
vec2(0.5f, 0.5f),
vec2(0.5f,-0.5f),
vec2(-0.5, -0.5f)
);
void main() {
// vec4 _position = <transform(input_position)>;
gl_Position = vec4(verts[gl_VertexID],0.0,1.0);
v_texCoord = texcoord / atlas_shape;
v_scale = 1.0;
v_color = vec4(1.0, 1.0, 1.0, 1.0);
}