From 1e25f716189c10156fd7a2cf20274bf28a911f53 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 31 Aug 2023 02:21:39 -0700 Subject: [PATCH] brain lol --- src/shader.wgsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shader.wgsl b/src/shader.wgsl index 41c0e59e..c44f4591 100644 --- a/src/shader.wgsl +++ b/src/shader.wgsl @@ -47,8 +47,8 @@ struct GroundOutput { @vertex fn vs_ground(@builtin(vertex_index) vertex_index: u32) -> GroundOutput { // hacky way to draw two triangles that make a square - let tmp1 = (i32(vertex_index)-i32(vertex_index)/3*2) / 2; - let tmp2 = (i32(vertex_index)-i32(vertex_index)/3*2) & 1; + let tmp1 = i32(vertex_index)/2-i32(vertex_index)/3; + let tmp2 = i32(vertex_index)&1; let pos = vec3( f32(tmp1) * 2.0 - 1.0, 0.0,