Skip to content

Commit 7be096a

Browse files
authored
Fix the z_sort_debug example from #1361 (#1419)
Fixes #1411
1 parent d5a7330 commit 7be096a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/3d/z_sort_debug.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn camera_order_color_system(
3434
for visible_entity in visible_entities.iter() {
3535
if let Ok(material_handle) = material_query.get(visible_entity.entity) {
3636
let material = materials.get_mut(&*material_handle).unwrap();
37-
let value = 1.0 - (visible_entity.order.0 - 10.0) / 7.0;
37+
let value = 1.0 - (visible_entity.order.0.sqrt() - 10.0) / 7.0;
3838
material.albedo = Color::rgb(value, value, value);
3939
}
4040
}

0 commit comments

Comments
 (0)