summaryrefslogtreecommitdiff
path: root/client/src/ui.wgsl
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-10 14:33:57 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-10 14:33:57 +0100
commitdbfb01fa7b5b05686dcbdd9d73643d7866810668 (patch)
tree9703c8222a459f1d7c7058dcfe7374ca29c98cbf /client/src/ui.wgsl
parent9446cda10e1a1b82e08d94c9c43a3e024e55c655 (diff)
downloadweareserver-dbfb01fa7b5b05686dcbdd9d73643d7866810668.tar
weareserver-dbfb01fa7b5b05686dcbdd9d73643d7866810668.tar.bz2
weareserver-dbfb01fa7b5b05686dcbdd9d73643d7866810668.tar.zst
fix egui rendering
Diffstat (limited to 'client/src/ui.wgsl')
-rw-r--r--client/src/ui.wgsl9
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/ui.wgsl b/client/src/ui.wgsl
index 3dd9b62..6361782 100644
--- a/client/src/ui.wgsl
+++ b/client/src/ui.wgsl
@@ -38,14 +38,13 @@ fn unpack_color(color: u32) -> vec4<f32> {
}
@vertex
-fn vs_main(vi: VertexIn) -> VertexOut {
- // var clip = project * vec4(vi.pos, 0., 1.);
- var clip = vec4(vi.pos / 200., 0., 1.);
+fn vs_main(@builtin(vertex_index) vindex: u32, vi: VertexIn) -> VertexOut {
+ var clip = project * vec4(vi.pos / 10., 0., 1.);
+ // var clip = vec4(vi.pos / 100., 0., 1.);
let vo = VertexOut(clip, vi.uv, unpack_color(vi.color));
return vo;
}
@fragment
fn fs_main(vo: VertexOut) -> @location(0) vec4<f32> {
- return vec4(1., 0., 1., 1.);
- // return textureSample(texture, texture_sampler, vo.uv) * vec4(vo.color, 1.);
+ return textureSample(texture, texture_sampler, vo.uv) * vo.color;
}