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

32 lines
530 B
GLSL
Raw Normal View History

#ifdef __cplusplus
#include <string>
const std::string shader_2d_textured_vert = R"("
#version 300 es
precision mediump float;
layout (location = 0) in vec3 vertex;
layout (location = 1) in vec2 uv_in;
out vec2 pos;
out vec2 uv;
layout (std140) uniform GlobalMatrices
{
mat4 projection;
mat4 ortho;
mat4 view;
mat4 pvm;
mat4 ovm;
};
uniform mat4 model;
2024-04-14 17:34:56 -04:00
uniform float z_index;
void main() {
2024-04-30 02:47:42 -04:00
gl_Position = ovm * model * vec4(vertex.xy, z_index, 1.0);
pos = vertex.xy;
uv = uv_in;
}
")";
#endif