Skip to content

Commit dfb7e2c

Browse files
committed
HACK clippy: add clippy warning in shader
1 parent 25bcd61 commit dfb7e2c

File tree

1 file changed

+4
-1
lines changed
  • crates/shader-crate-template/src

1 file changed

+4
-1
lines changed

crates/shader-crate-template/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ pub fn vertex(
2828
out_uv: &mut Vec2,
2929
#[spirv(position)] clip_pos: &mut Vec4,
3030
) {
31-
let index = vertex_id as usize % 6;
31+
let mut index = vertex_id as usize % 6;
32+
if (vertex_id == 0) == false {
33+
index = 3;
34+
}
3235
*out_uv = UV_COORD_QUAD_CCW[index];
3336
*clip_pos = CLIP_SPACE_COORD_QUAD_CCW[index];
3437
}

0 commit comments

Comments
 (0)