bevy
bevy copied to clipboard
When we draw Quad with Mesh and then draw other sprite in the same Z-coordinate the result is uncertain
Bevy version
Bevy version is 0.9, platform is window 10, GPU is Nvidia Geforce mx250, driver is 516.40
Bug
If you use the code below, when we draw Quad with Mesh and then draw other sprite in the same Z-coordinate the result is uncertain
let pentagon = Quad::new(Vec2 { x: 100., y: 100.});
let handle = meshes.add(Mesh::from(pentagon));
commands.spawn(ColorMesh2dBundle {
mesh: handle.into(),
transform: Transform::from_translation(Vec3::new(0., 0., 1.)),
..default()
});
commands.spawn(SpriteBundle {
sprite: Sprite {
color: Color::rgb(0.25, 0.25, 0.75),
custom_size: Some(Vec2::new(150.0, 100.0)),
..default()
},
transform: Transform::from_translation(Vec3::new(0., 0., 1.)),
..default()
});
Sometimes it only shows blue rectangle, sometimes it shows purple and blue rectangles. You can try to build more and more times.