Fix the z_sort_debug example from #1361 (#1419)

Fixes #1411
This commit is contained in:
Daniel McNab 2021-02-09 20:37:49 +00:00 committed by GitHub
parent d5a7330431
commit 7be096a254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,7 @@ fn camera_order_color_system(
for visible_entity in visible_entities.iter() {
if let Ok(material_handle) = material_query.get(visible_entity.entity) {
let material = materials.get_mut(&*material_handle).unwrap();
let value = 1.0 - (visible_entity.order.0 - 10.0) / 7.0;
let value = 1.0 - (visible_entity.order.0.sqrt() - 10.0) / 7.0;
material.albedo = Color::rgb(value, value, value);
}
}