From d15d901cab763a1619f4dffbfd0418618daebe7f Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Fri, 18 Oct 2024 20:24:58 -0500 Subject: [PATCH] OIT style tweaks (#15999) Just some very minor fixes to the OIT example. --- examples/3d/order_independent_transparency.rs | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/examples/3d/order_independent_transparency.rs b/examples/3d/order_independent_transparency.rs index c1448173e8..03590eb21b 100644 --- a/examples/3d/order_independent_transparency.rs +++ b/examples/3d/order_independent_transparency.rs @@ -11,7 +11,6 @@ use bevy::{ }; fn main() { - std::env::set_var("RUST_BACKTRACE", "1"); App::new() .add_plugins(DefaultPlugins) .add_systems(Startup, setup) @@ -26,18 +25,15 @@ fn setup( mut materials: ResMut>, ) { // camera - commands - .spawn(( - Camera3d::default(), - Transform::from_xyz(0.0, 0.0, 10.0).looking_at(Vec3::ZERO, Vec3::Y), - // Add this component to this camera to render transparent meshes using OIT - OrderIndependentTransparencySettings::default(), - RenderLayers::layer(1), - )) - .insert( - // Msaa currently doesn't work with OIT - Msaa::Off, - ); + commands.spawn(( + Camera3d::default(), + Transform::from_xyz(0.0, 0.0, 10.0).looking_at(Vec3::ZERO, Vec3::Y), + // Add this component to this camera to render transparent meshes using OIT + OrderIndependentTransparencySettings::default(), + RenderLayers::layer(1), + // Msaa currently doesn't work with OIT + Msaa::Off, + )); // light commands.spawn((