Skip to content

Commit c5142d8

Browse files
committed
fix(pcss): add shadow maps and extracted lights to SyncComponent for lights
1 parent c040d76 commit c5142d8

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

crates/bevy_pbr/src/lib.rs

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ pub mod contact_shadows;
3030
#[cfg(feature = "bevy_gltf")]
3131
mod gltf;
3232
use bevy_light::cluster::GlobalClusterSettings;
33-
use bevy_render::sync_component::SyncComponent;
33+
use bevy_render::{
34+
sync_component::SyncComponent,
35+
view::{RenderExtractedShadowMapVisibleEntities, RenderShadowMapVisibleEntities},
36+
};
3437
pub use contact_shadows::{
3538
ContactShadows, ContactShadowsBuffer, ContactShadowsPlugin, ContactShadowsUniform,
3639
ViewContactShadowsUniformOffset,
@@ -437,16 +440,31 @@ pub fn stbn_placeholder() -> Image {
437440
}
438441

439442
impl SyncComponent<PbrPlugin> for DirectionalLight {
440-
type Target = Self;
443+
type Target = (
444+
Self,
445+
ExtractedDirectionalLight,
446+
RenderExtractedShadowMapVisibleEntities,
447+
RenderShadowMapVisibleEntities,
448+
);
441449
}
442450
impl SyncComponent<PbrPlugin> for PointLight {
443-
type Target = Self;
451+
type Target = (
452+
Self,
453+
ExtractedPointLight,
454+
RenderExtractedShadowMapVisibleEntities,
455+
RenderShadowMapVisibleEntities,
456+
);
444457
}
445458
impl SyncComponent<PbrPlugin> for SpotLight {
446-
type Target = Self;
459+
type Target = (
460+
Self,
461+
ExtractedPointLight,
462+
RenderExtractedShadowMapVisibleEntities,
463+
RenderShadowMapVisibleEntities,
464+
);
447465
}
448466
impl SyncComponent<PbrPlugin> for RectLight {
449-
type Target = Self;
467+
type Target = (Self, ExtractedRectLight);
450468
}
451469
impl SyncComponent<PbrPlugin> for AmbientLight {
452470
type Target = Self;

0 commit comments

Comments
 (0)