blob: d84cc560a8600734010b35666a6150f56fce2ed1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#version 450
layout (push_constant) uniform PushConsts {
vec2 screen_size;
} push;
layout(location = 0) in vec2 pos;
layout (location = 1) in vec2 uv;
layout (location = 2) in uint col; // rgba of u8s
out gl_PerVertex {
vec4 gl_Position;
};
layout (location = 1) out vec2 frag_uv;
layout (location = 2) out uint frag_col;
void main() {
gl_Position = vec4(
((pos.x / push.screen_size.x) * 2.0) - 1.0,
((pos.y / push.screen_size.y) * 2.0) - 1.0,
0.0,
1.0
);
frag_uv = uv;
frag_col = col;
}
|