Cleanup clearcoat
example (#15594)
The components needed for `DirectionalLight` are added automatically since #15554 `create_point_light` already existed and returns a `PointLight` with these same settings
This commit is contained in:
parent
59db6f9cca
commit
ca709ffb5a
@ -23,9 +23,8 @@ use bevy::{
|
|||||||
color::palettes::css::{BLUE, GOLD, WHITE},
|
color::palettes::css::{BLUE, GOLD, WHITE},
|
||||||
core_pipeline::{tonemapping::Tonemapping::AcesFitted, Skybox},
|
core_pipeline::{tonemapping::Tonemapping::AcesFitted, Skybox},
|
||||||
math::vec3,
|
math::vec3,
|
||||||
pbr::{CascadeShadowConfig, Cascades, CascadesVisibleEntities},
|
|
||||||
prelude::*,
|
prelude::*,
|
||||||
render::{primitives::CascadesFrusta, texture::ImageLoaderSettings},
|
render::texture::ImageLoaderSettings,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The size of each sphere.
|
/// The size of each sphere.
|
||||||
@ -184,19 +183,7 @@ fn spawn_scratched_gold_ball(
|
|||||||
|
|
||||||
/// Spawns a light.
|
/// Spawns a light.
|
||||||
fn spawn_light(commands: &mut Commands) {
|
fn spawn_light(commands: &mut Commands) {
|
||||||
commands.spawn((
|
commands.spawn(create_point_light());
|
||||||
PointLight {
|
|
||||||
color: WHITE.into(),
|
|
||||||
intensity: 100000.0,
|
|
||||||
..default()
|
|
||||||
},
|
|
||||||
// Add the cascades objects used by the `DirectionalLight`, since the
|
|
||||||
// user can toggle between a point light and a directional light.
|
|
||||||
CascadesFrusta::default(),
|
|
||||||
Cascades::default(),
|
|
||||||
CascadeShadowConfig::default(),
|
|
||||||
CascadesVisibleEntities::default(),
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Spawns a camera with associated skybox and environment map.
|
/// Spawns a camera with associated skybox and environment map.
|
||||||
|
Loading…
Reference in New Issue
Block a user