COSC-3P98-Final-Project/include/shaders/text.vert

29 lines
530 B
GLSL
Raw Permalink Normal View History

2023-02-15 00:49:27 -05:00
#ifdef __cplusplus
#include <string>
std::string shader_text_vert = R"("
#version 300 es
precision mediump float;
layout (location = 0) in vec4 vertex;
out vec2 texture_coords;
2023-02-17 10:55:21 -05:00
uniform mat4 translation;
2023-02-15 00:49:27 -05:00
layout (std140) uniform StandardMatrices
{
mat4 projection;
mat4 view;
// projection view matrix
mat4 pvm;
// orthographic projection matrix
mat4 orthographic;
};
void main() {
2023-02-17 10:55:21 -05:00
gl_Position = orthographic * translation * vec4(vertex.xy, 0.0, 1.0);
texture_coords = vertex.zw;
2023-02-15 00:49:27 -05:00
}
")";
#endif