Depth bias does not seem to work (unless I misunderstand what it is?). In the image attached, you can see that I have a 'select border' when I select my units. The entire select border should be visible, but as you can see, half of it extends through the floor.
My ground has a depth bias of NEG_INFINITY:
Mesh3d(meshes.add(Plane3d::default().mesh().size(MAP_WIDTH, MAP_DEPTH))),
MeshMaterial3d(materials.add(StandardMaterial {
base_color: Color::srgb(0.3, 0.5, 0.3),
depth_bias: NEG_INFINITY,
..Default::default()
})),
My select border has a depth bias of INFINITY
Mesh3d(meshes.add(Rectangle::new(17.0, 17.0))), // TODO: the size needs to be dynamic for various units
MeshMaterial3d(materials.add(StandardMaterial {
base_color_texture: Some(my_assets.select_border.clone()),
depth_bias: INFINITY, // TODO: Not working?
alpha_mode: AlphaMode::Blend,
unlit: true,
..default()
})),
I also tried the other way around to no avail.