diff options
Diffstat (limited to 'client/src/ui.wgsl')
-rw-r--r-- | client/src/ui.wgsl | 9 |
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; } |