Closed as not planned
Description
Bevy version
bevy = "0.10.1"
[Optional] Relevant system information
the Rust version you're using (you can get this by running
cargo --version
)
cargo 1.68.2 (6feb7c9cf 2023-03-26)
the operating system or browser used, including its version
Windows 10, Desktop App
If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
AdapterInfo { name: "NVIDIA GeForce GTX 1070", vendor: 4318, device: 7041, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "516.94", backend: Vulkan }
What you did
I build example https://bevyengine.org/examples/shader/shader-material/.
Then I add the green-colored outer-cube to example, like this (ADD START - ADD END) :
/// set up a simple 3D scene
fn setup(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<CustomMaterial>>,
asset_server: Res<AssetServer>,
) {
// cube
commands.spawn(MaterialMeshBundle {
mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
material: materials.add(CustomMaterial {
color: Color::BLUE,
color_texture: Some(asset_server.load("branding/icon.png")),
alpha_mode: AlphaMode::Blend,
}),
..default()
});
// ADD START
commands.spawn(MaterialMeshBundle {
mesh: meshes.add(Mesh::from(shape::Cube { size: 3.0 })),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
material: materials.add(CustomMaterial {
color: Color::GREEN,
color_texture: Some(asset_server.load("branding/icon.png")),
alpha_mode: AlphaMode::Blend,
}),
..default()
});
// ADD END
// camera
commands.spawn(Camera3dBundle {
transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
..default()
});
}
What went wrong
My expect : show green-cube because blue-cube is hided from it.
Result : blue-cube is displayed flickering. I attach a movie.