Skip to content

Commit

Permalink
Remove Camera2d in bloom example (bevyengine#6462)
Browse files Browse the repository at this point in the history
# Objective

The bloom example has a 2d camera for the UI. This is an artifact of an older version of bevy. All cameras can render the UI now.

## Solution

Remove the 2d camera
  • Loading branch information
IceSentry authored and ItsDoot committed Feb 1, 2023
1 parent 79eb719 commit ab30839
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions examples/3d/bloom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ fn setup_scene(

let material_emissive = materials.add(StandardMaterial {
emissive: Color::rgb_linear(5.2, 1.2, 0.8), // 3. Set StandardMaterial::emissive using Color::rgb_linear, for entities we want to apply bloom to
..Default::default()
..default()
});
let material_non_emissive = materials.add(StandardMaterial {
base_color: Color::GRAY,
..Default::default()
..default()
});

let mesh = meshes.add(
Expand Down Expand Up @@ -67,22 +67,13 @@ fn setup_scene(
mesh: mesh.clone(),
material,
transform: Transform::from_xyz(x as f32 * 2.0, 0.0, z as f32 * 2.0),
..Default::default()
..default()
},
Bouncing,
));
}
}

// UI camera
commands.spawn(Camera2dBundle {
camera: Camera {
priority: -1,
..default()
},
..default()
});

commands.spawn(
TextBundle::from_section(
"",
Expand Down

0 comments on commit ab30839

Please sign in to comment.