Skip to content

Commit d15d901

Browse files
authored
OIT style tweaks (#15999)
Just some very minor fixes to the OIT example.
1 parent fcf6067 commit d15d901

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

examples/3d/order_independent_transparency.rs

+9-13
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use bevy::{
1111
};
1212

1313
fn main() {
14-
std::env::set_var("RUST_BACKTRACE", "1");
1514
App::new()
1615
.add_plugins(DefaultPlugins)
1716
.add_systems(Startup, setup)
@@ -26,18 +25,15 @@ fn setup(
2625
mut materials: ResMut<Assets<StandardMaterial>>,
2726
) {
2827
// camera
29-
commands
30-
.spawn((
31-
Camera3d::default(),
32-
Transform::from_xyz(0.0, 0.0, 10.0).looking_at(Vec3::ZERO, Vec3::Y),
33-
// Add this component to this camera to render transparent meshes using OIT
34-
OrderIndependentTransparencySettings::default(),
35-
RenderLayers::layer(1),
36-
))
37-
.insert(
38-
// Msaa currently doesn't work with OIT
39-
Msaa::Off,
40-
);
28+
commands.spawn((
29+
Camera3d::default(),
30+
Transform::from_xyz(0.0, 0.0, 10.0).looking_at(Vec3::ZERO, Vec3::Y),
31+
// Add this component to this camera to render transparent meshes using OIT
32+
OrderIndependentTransparencySettings::default(),
33+
RenderLayers::layer(1),
34+
// Msaa currently doesn't work with OIT
35+
Msaa::Off,
36+
));
4137

4238
// light
4339
commands.spawn((

0 commit comments

Comments
 (0)