added system for cascading shadow maps
This commit is contained in:
@@ -7,6 +7,7 @@ use bevy::ecs::component::Component;
|
||||
use bevy::ecs::reflect::ReflectComponent;
|
||||
use bevy::ecs::schedule::IntoSystemConfigs;
|
||||
use bevy::math::{Mat4, Vec3A};
|
||||
use bevy::pbr::{build_directional_light_cascades, clear_directional_light_cascades, SimulationLightSystems};
|
||||
use bevy::reflect::std_traits::ReflectDefault;
|
||||
use bevy::reflect::Reflect;
|
||||
use bevy::render::camera::{
|
||||
@@ -30,6 +31,12 @@ impl Plugin for XrCameraPlugin {
|
||||
.after(TransformSystem::TransformPropagate)
|
||||
.before(VisibilitySystems::UpdateFrusta),
|
||||
);
|
||||
app.add_systems(
|
||||
PostUpdate,
|
||||
build_directional_light_cascades::<XrProjection>
|
||||
.in_set(SimulationLightSystems::UpdateDirectionalLightCascades)
|
||||
.after(clear_directional_light_cascades),
|
||||
);
|
||||
app.add_plugins((
|
||||
ExtractComponentPlugin::<XrProjection>::default(),
|
||||
ExtractComponentPlugin::<XrCamera>::default(),
|
||||
|
||||
Reference in New Issue
Block a user