~starkingdoms/starkingdoms

ref: 5704afa8852d493b8424b186d3390ab2b9a8aefd starkingdoms/crates/client/src/shaders/vertex.glsl -rw-r--r-- 290 bytes
5704afa8 — ghostly_zsh open crafting ui with mouse 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
precision mediump float;

in vec2 pos;
in vec2 texcoord;

out vec2 v_texcoord;

uniform mat4 model;
uniform mat4 view;

void main() {
    v_texcoord = vec2(texcoord.x, -texcoord.y);
    vec4 v_pos = view * model * vec4(pos, 0.0, 1.0);
    gl_Position = vec4(v_pos.x, -v_pos.y, v_pos.zw);
}