OIT style tweaks (#15999)
Just some very minor fixes to the OIT example.
This commit is contained in:
parent
fcf6067a10
commit
d15d901cab
@ -11,7 +11,6 @@ use bevy::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
std::env::set_var("RUST_BACKTRACE", "1");
|
|
||||||
App::new()
|
App::new()
|
||||||
.add_plugins(DefaultPlugins)
|
.add_plugins(DefaultPlugins)
|
||||||
.add_systems(Startup, setup)
|
.add_systems(Startup, setup)
|
||||||
@ -26,18 +25,15 @@ fn setup(
|
|||||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||||
) {
|
) {
|
||||||
// camera
|
// camera
|
||||||
commands
|
commands.spawn((
|
||||||
.spawn((
|
Camera3d::default(),
|
||||||
Camera3d::default(),
|
Transform::from_xyz(0.0, 0.0, 10.0).looking_at(Vec3::ZERO, Vec3::Y),
|
||||||
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
|
||||||
// Add this component to this camera to render transparent meshes using OIT
|
OrderIndependentTransparencySettings::default(),
|
||||||
OrderIndependentTransparencySettings::default(),
|
RenderLayers::layer(1),
|
||||||
RenderLayers::layer(1),
|
// Msaa currently doesn't work with OIT
|
||||||
))
|
Msaa::Off,
|
||||||
.insert(
|
));
|
||||||
// Msaa currently doesn't work with OIT
|
|
||||||
Msaa::Off,
|
|
||||||
);
|
|
||||||
|
|
||||||
// light
|
// light
|
||||||
commands.spawn((
|
commands.spawn((
|
||||||
|
Loading…
Reference in New Issue
Block a user