You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Display a sprite that covers everything black as a children of another entity
Display a sprite from a transparent png
use bevy::prelude::*;fnmain(){App::build().add_plugins(DefaultPlugins).insert_resource(ClearColor(Color::RED)).add_startup_system(setup.system()).add_system(cycle.system()).run();}fnsetup(commands:&mutCommands,mutmaterials:ResMut<Assets<ColorMaterial>>){
commands
.spawn(OrthographicCameraBundle::new_2d()).spawn((GlobalTransform::default(),Transform::default())).with_children(|p| {
p.spawn(SpriteBundle{material: materials.add(Color::BLACK.into()),sprite:Sprite{size:Vec2::new(10000.,10000.),
..Default::default()},
..Default::default()});});}structShouldTransparent;fncycle(commands:&mutCommands,mutcycle:Local<u32>,asset_server:Res<AssetServer>,mutmaterials:ResMut<Assets<ColorMaterial>>,){*cycle = (*cycle + 1) % 20;if*cycle == 0{let texture_handle = asset_server.load("branding/icon.png");for x in -1..=1{for y in -1..=1{
commands.spawn(SpriteBundle{material: materials.add(texture_handle.clone().into()),transform:Transform{translation:Vec3::new(x asf32*256., y asf32*256.,0.1),scale:Vec3::one(),rotation:Quat::default(),},
..Default::default()});// .with(ShouldTransparent);}}}}
What you expected to happen
No transparency issue
What actually happened
The red clear color leaks through for a frame
Additional information
If I remove the hierarchy for the black background, there are no transparency issue.
If I add the tag component ShouldTransparent to my sprites, there are no transparency issue.
The text was updated successfully, but these errors were encountered:
Bevy version
current main (bc4fe9b)
Operating system & version
MacOS 10.15.7
What you did
What you expected to happen
No transparency issue
What actually happened
The red clear color leaks through for a frame

Additional information
If I remove the hierarchy for the black background, there are no transparency issue.
If I add the tag component
ShouldTransparent
to my sprites, there are no transparency issue.The text was updated successfully, but these errors were encountered: