Skip to content

Commit

Permalink
fix examples after the switch for msaa to a component (bevyengine#14446)
Browse files Browse the repository at this point in the history
# Objective

- bevyengine#14273 changed MSAA to a component, and broke some examples

- SSAO needs MSAA to be disabled

https://github.com/bevyengine/bevy/blob/f0ff7fb5445996e561d9ea336ee353544d79fef6/crates/bevy_pbr/src/ssao/mod.rs#L495

- `AlphaMode::AlphaToCoverage` needs MSAA to be not off to do something

https://github.com/bevyengine/bevy/blob/f0ff7fb5445996e561d9ea336ee353544d79fef6/examples/3d/transparency_3d.rs#L113-L117

# Solution

- change MSAA in those examples
  • Loading branch information
mockersf authored Jul 24, 2024
1 parent abceebe commit 8dc6ccf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions examples/3d/ssao.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fn setup(
..default()
},
transform: Transform::from_xyz(-2.0, 2.0, -2.0).looking_at(Vec3::ZERO, Vec3::Y),
msaa: Msaa::Off,
..default()
})
.insert(ScreenSpaceAmbientOcclusionBundle::default())
Expand Down
1 change: 0 additions & 1 deletion examples/3d/transparency_3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ fn setup(
// Camera
commands.spawn(Camera3dBundle {
transform: Transform::from_xyz(-2.0, 3.0, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
msaa: Msaa::Off,
..default()
});
}
Expand Down

0 comments on commit 8dc6ccf

Please sign in to comment.