2022-01-20 21:58:50 +08:00
|
|
|
#version 330
|
|
|
|
|
2022-02-16 00:29:34 +08:00
|
|
|
#define FLAG_RED (1<<0)
|
|
|
|
#define FLAG_GREEN (1<<1)
|
|
|
|
#define FLAG_BLUE (1<<2)
|
|
|
|
#define FLAG_ALPHA (1<<3)
|
|
|
|
#define FLAG_COLORS (FLAG_RED | FLAG_GREEN | FLAG_BLUE | FLAG_ALPHA)
|
|
|
|
|
|
|
|
#define FLAG_LINEAR (1<<4)
|
|
|
|
#define FLAG_IMGUI_FONT (1<<5)
|
|
|
|
#define FLAG_FLIP_Y (1<<6)
|
|
|
|
|
2022-01-20 21:58:50 +08:00
|
|
|
uniform mat4 projection;
|
2022-02-16 00:29:34 +08:00
|
|
|
uniform int flags;
|
2022-01-20 21:58:50 +08:00
|
|
|
|
|
|
|
in vec2 pos;
|
|
|
|
in vec2 uv;
|
|
|
|
in vec4 color;
|
|
|
|
|
|
|
|
out vec2 fragUV;
|
|
|
|
out vec4 fragColor;
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
fragUV = uv;
|
|
|
|
fragColor = color;
|
|
|
|
gl_Position = projection * vec4(pos.xy, 0, 1);
|
|
|
|
}
|
|
|
|
|