~starkingdoms/starkingdoms

ref: ac4be9832c7cc1a735c4a593f3e9a4c4fb952deb starkingdoms/crates/client/src/assets/shaders/vertex.glsl -rw-r--r-- 307 bytes
ac4be983 — core chore(lint): pass clippy 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#version 300 es

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);
}