From dbfb01fa7b5b05686dcbdd9d73643d7866810668 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 10 Jan 2025 14:33:57 +0100 Subject: fix egui rendering --- client/src/ui.wgsl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'client/src/ui.wgsl') 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 { } @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 { - 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; } -- cgit v1.2.3-70-g09d2