Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions crates/bevy_pbr/src/render/gpu_preprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ use bevy_core_pipeline::{
mip_generation::experimental::depth::{early_downsample_depth, ViewDepthPyramid},
prepass::{
node::{early_prepass, late_prepass},
DepthPrepass, PreviousViewData, PreviousViewUniformOffset, PreviousViewUniforms,
DeferredPrepass, DepthPrepass, MotionVectorPrepass, NormalPrepass, PreviousViewData,
PreviousViewUniformOffset, PreviousViewUniforms,
},
schedule::{Core3d, Core3dSystems},
};
Expand Down Expand Up @@ -383,6 +384,13 @@ pub struct ViewPhaseBinUnpackingBindGroup {
#[derive(Component, Default)]
pub struct SkipGpuPreprocess;

type WithAnyPrepass = Or<(
With<DepthPrepass>,
With<NormalPrepass>,
With<MotionVectorPrepass>,
With<DeferredPrepass>,
)>;

impl Plugin for GpuMeshPreprocessPlugin {
fn build(&self, app: &mut App) {
embedded_asset!(app, "mesh_preprocess.wgsl");
Expand Down Expand Up @@ -436,7 +444,7 @@ impl Plugin for GpuMeshPreprocessPlugin {
With<PreprocessBindGroups>,
Without<SkipGpuPreprocess>,
Without<NoIndirectDrawing>,
Or<(With<DepthPrepass>, With<ShadowView>)>,
Or<(WithAnyPrepass, With<ShadowView>)>,
)>),
)
.chain()
Expand All @@ -447,7 +455,7 @@ impl Plugin for GpuMeshPreprocessPlugin {
With<PreprocessBindGroups>,
Without<SkipGpuPreprocess>,
Without<NoIndirectDrawing>,
Or<(With<DepthPrepass>, With<ShadowView>)>,
Or<(WithAnyPrepass, With<ShadowView>)>,
With<OcclusionCulling>,
)>),
)
Expand Down