BLT-With-Graphics-Template/include/blt/gfx/renderer/shaders/2d_font.vert

29 lines
466 B
GLSL
Raw Permalink Normal View History

2024-11-11 19:21:42 -05:00
#ifdef __cplusplus
#include <string>
const std::string shader_2d_font_vert = R"("
#version 300 es
precision mediump float;
layout (location = 0) in vec4 vertex;
out vec2 uv;
layout (std140) uniform GlobalMatrices
{
mat4 projection;
mat4 ortho;
mat4 view;
mat4 pvm;
mat4 ovm;
};
uniform float z_index;
2024-11-12 18:26:34 -05:00
uniform mat4 transform;
2024-11-11 19:21:42 -05:00
void main() {
2024-11-12 18:26:34 -05:00
gl_Position = ovm * transform * vec4(vertex.xy, z_index, 1.0);
2024-11-11 19:21:42 -05:00
uv = vertex.zw;
}
")";
#endif