diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-07 00:00:55 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-07 00:00:55 +0100 |
commit | 32d493db1d897a61fd3e1170136fa3e812704837 (patch) | |
tree | 1016ff7d91f1dbbe62b524be20d05a33d5a4da2f /client/src/shader.wgsl | |
parent | 45282d3a54cc50306383c41e4c7e3d982cac69d1 (diff) | |
download | weareserver-32d493db1d897a61fd3e1170136fa3e812704837.tar weareserver-32d493db1d897a61fd3e1170136fa3e812704837.tar.bz2 weareserver-32d493db1d897a61fd3e1170136fa3e812704837.tar.zst |
monkey spin
Diffstat (limited to 'client/src/shader.wgsl')
-rw-r--r-- | client/src/shader.wgsl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/shader.wgsl b/client/src/shader.wgsl index 68bd93d..d2b2d9f 100644 --- a/client/src/shader.wgsl +++ b/client/src/shader.wgsl @@ -15,10 +15,14 @@ struct VertexOut { @location(1) uv: vec2<f32>, } +var<push_constant> project: mat4x4<f32>; + @vertex fn vs_main(vi: VertexIn) -> VertexOut { + var clip = project * vec4(vi.x, vi.y, vi.z, -1.); + clip /= clip.w; let vo = VertexOut( - vec4(vi.x * 0.1, vi.y * 0.1, 0., 1.), + clip, vec3(vi.nx, vi.ny, vi.nz), vec2(vi.u, vi.v), ); |