1
0
Fork 0
fgdata/gui/shaders/canvas_pipeline.vert

19 lines
335 B
GLSL
Raw Normal View History

2023-03-08 10:27:55 +00:00
#version 330 core
2023-04-13 06:25:07 +00:00
out vec2 texImageCoord;
out vec2 paintCoord;
in vec2 pos;
in vec2 textureUV;
2023-04-13 06:25:07 +00:00
uniform mat4 sh_Model;
uniform mat4 sh_Ortho;
uniform mat3 paintInverted;
2023-03-08 10:27:55 +00:00
void main()
{
2024-01-23 18:23:10 +00:00
gl_Position = sh_Ortho * sh_Model * vec4(pos, 0.0, 1.0);
texImageCoord = textureUV;
2024-01-23 18:23:10 +00:00
paintCoord = (paintInverted * vec3(pos, 1.0)).xy;
}