Skip to content

Commit 0d1630c

Browse files
committed
Fix test. We use vk/webgpu depth not ogl.
1 parent 4dc1350 commit 0d1630c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/processing_render/src/graphics.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,9 @@ mod tests {
615615
};
616616
let clip_matrix = proj.get_clip_from_view();
617617
// Check some values in the matrix to ensure it's correct
618-
assert_eq!(clip_matrix.w_axis.z, -2.0 / (1000.0 - 0.1));
618+
// In [0,1] depth orthographic projection, w_axis.z = -near/(far-near)
619+
let expected = -0.1 / (1000.0 - 0.1);
620+
assert!((clip_matrix.w_axis.z - expected).abs() < 1e-6);
619621
}
620622

621623
#[test]

0 commit comments

Comments
 (0)