diff --git a/examples/3d/lighting.rs b/examples/3d/lighting.rs index 73856c01a6e29..cda59998ca0ee 100644 --- a/examples/3d/lighting.rs +++ b/examples/3d/lighting.rs @@ -22,6 +22,7 @@ fn setup( mut commands: Commands, mut meshes: ResMut>, mut materials: ResMut>, + asset_server: Res, ) { // ground plane commands.spawn(PbrBundle { @@ -61,6 +62,25 @@ fn setup( ..default() }); + // Bevy logo to demonstrate alpha mask shadows + let mut transform = Transform::from_xyz(-2.2, 0.5, 1.0); + transform.rotate_y(PI / 8.); + commands.spawn(( + PbrBundle { + mesh: meshes.add(Mesh::from(shape::Quad::new(Vec2::new(2.0, 0.5)))), + transform, + material: materials.add(StandardMaterial { + base_color_texture: Some(asset_server.load("branding/bevy_logo_light.png")), + perceptual_roughness: 1.0, + alpha_mode: AlphaMode::Mask(0.5), + cull_mode: None, + ..default() + }), + ..default() + }, + Movable, + )); + // cube commands.spawn(( PbrBundle {