brain lol

This commit is contained in:
Quaternions 2023-08-31 02:21:39 -07:00
parent 4ee5a0fb2b
commit 1e25f71618

View File

@ -47,8 +47,8 @@ struct GroundOutput {
@vertex @vertex
fn vs_ground(@builtin(vertex_index) vertex_index: u32) -> GroundOutput { fn vs_ground(@builtin(vertex_index) vertex_index: u32) -> GroundOutput {
// hacky way to draw two triangles that make a square // hacky way to draw two triangles that make a square
let tmp1 = (i32(vertex_index)-i32(vertex_index)/3*2) / 2; let tmp1 = i32(vertex_index)/2-i32(vertex_index)/3;
let tmp2 = (i32(vertex_index)-i32(vertex_index)/3*2) & 1; let tmp2 = i32(vertex_index)&1;
let pos = vec3<f32>( let pos = vec3<f32>(
f32(tmp1) * 2.0 - 1.0, f32(tmp1) * 2.0 - 1.0,
0.0, 0.0,