Refactor text rendering to use less input data
This commit is contained in:
parent
c1b6a2add3
commit
678414f014
2 changed files with 57 additions and 40 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue