Refactor text rendering to use less input data

This commit is contained in:
Phireh 2024-01-06 13:16:00 +01:00
commit 678414f014
2 changed files with 57 additions and 40 deletions

View file

@ -1,11 +1,13 @@
#version 330 core
layout (location = 0) in vec4 vertex; // <vec2 pos, vec2 tex>
layout (location = 0) in vec2 vertex; // <vec2 pos>
out vec2 texuv;
uniform mat4 transform;
uniform mat4 projection;
void main()
{
gl_Position = projection * vec4(vertex.xy, 0.0, 1.0);
texuv = vertex.zw;
gl_Position = projection * transform * vec4(vertex.xy, 0.0, 1.0);
texuv = vertex.xy;
texuv.y=1.0f-texuv.y;
}