Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion crates/bevy_anti_alias/src/taa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl Plugin for TemporalAntiAliasPlugin {
.add_render_graph_edges(
Core3d,
(
Node3d::EndMainPass,
Node3d::StartMainPassPostProcessing,
Node3d::MotionBlur, // Running before TAA reduces edge artifacts and noise
Node3d::Taa,
Node3d::Bloom,
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_core_pipeline/src/core_2d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub mod graph {
MainTransparentPass,
EndMainPass,
Wireframe,
StartMainPassPostProcessing,
Bloom,
PostProcessing,
Tonemapping,
Expand Down Expand Up @@ -118,6 +119,7 @@ impl Plugin for Core2dPlugin {
Node2d::MainTransparentPass,
)
.add_render_graph_node::<EmptyNode>(Core2d, Node2d::EndMainPass)
.add_render_graph_node::<EmptyNode>(Core2d, Node2d::StartMainPassPostProcessing)
.add_render_graph_node::<ViewNodeRunner<TonemappingNode>>(Core2d, Node2d::Tonemapping)
.add_render_graph_node::<EmptyNode>(Core2d, Node2d::EndMainPassPostProcessing)
.add_render_graph_node::<ViewNodeRunner<UpscalingNode>>(Core2d, Node2d::Upscaling)
Expand All @@ -128,6 +130,7 @@ impl Plugin for Core2dPlugin {
Node2d::MainOpaquePass,
Node2d::MainTransparentPass,
Node2d::EndMainPass,
Node2d::StartMainPassPostProcessing,
Node2d::Tonemapping,
Node2d::EndMainPassPostProcessing,
Node2d::Upscaling,
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_core_pipeline/src/core_3d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub mod graph {
MainTransparentPass,
EndMainPass,
Wireframe,
StartMainPassPostProcessing,
LateDownsampleDepth,
MotionBlur,
Taa,
Expand Down Expand Up @@ -213,6 +214,7 @@ impl Plugin for Core3dPlugin {
Node3d::MainTransparentPass,
)
.add_render_graph_node::<EmptyNode>(Core3d, Node3d::EndMainPass)
.add_render_graph_node::<EmptyNode>(Core3d, Node3d::StartMainPassPostProcessing)
.add_render_graph_node::<ViewNodeRunner<TonemappingNode>>(Core3d, Node3d::Tonemapping)
.add_render_graph_node::<EmptyNode>(Core3d, Node3d::EndMainPassPostProcessing)
.add_render_graph_node::<ViewNodeRunner<UpscalingNode>>(Core3d, Node3d::Upscaling)
Expand All @@ -230,6 +232,7 @@ impl Plugin for Core3dPlugin {
Node3d::MainTransmissivePass,
Node3d::MainTransparentPass,
Node3d::EndMainPass,
Node3d::StartMainPassPostProcessing,
Node3d::Tonemapping,
Node3d::EndMainPassPostProcessing,
Node3d::Upscaling,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Plugin for MipGenerationPlugin {
.add_render_graph_edges(
Core3d,
(
Node3d::EndMainPass,
Node3d::StartMainPassPostProcessing,
Node3d::LateDownsampleDepth,
Node3d::EndMainPassPostProcessing,
),
Expand Down
10 changes: 7 additions & 3 deletions crates/bevy_pbr/src/volumetric_fog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ impl Plugin for VolumetricFogPlugin {
)
.add_render_graph_edges(
Core3d,
// Volumetric fog is a postprocessing effect. Run it after the
// main pass but before bloom.
(Node3d::EndMainPass, NodePbr::VolumetricFog, Node3d::Bloom),
// Volumetric fog should run after the main pass but before bloom, so
// we order if at the start of post processing.
(
Node3d::EndMainPass,
NodePbr::VolumetricFog,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like maybe this should be ordered before EndMainPass if it's considered to be part of the main pass? I'm just not sure where it should go. I guess this works well enough though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think its considered to be part of the main pass

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was 100% basing this based on the comment that was above 😅.

Node3d::StartMainPassPostProcessing,
),
);
}
}
6 changes: 5 additions & 1 deletion crates/bevy_post_process/src/auto_exposure/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ impl Plugin for AutoExposurePlugin {
.add_render_graph_node::<AutoExposureNode>(Core3d, node::AutoExposure)
.add_render_graph_edges(
Core3d,
(Node3d::EndMainPass, node::AutoExposure, Node3d::Tonemapping),
(
Node3d::StartMainPassPostProcessing,
node::AutoExposure,
Node3d::Tonemapping,
),
);
}
}
Expand Down
12 changes: 10 additions & 2 deletions crates/bevy_post_process/src/bloom/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,21 @@ impl Plugin for BloomPlugin {
.add_render_graph_node::<ViewNodeRunner<BloomNode>>(Core3d, Node3d::Bloom)
.add_render_graph_edges(
Core3d,
(Node3d::EndMainPass, Node3d::Bloom, Node3d::Tonemapping),
(
Node3d::StartMainPassPostProcessing,
Node3d::Bloom,
Node3d::Tonemapping,
),
)
// Add bloom to the 2d render graph
.add_render_graph_node::<ViewNodeRunner<BloomNode>>(Core2d, Node2d::Bloom)
.add_render_graph_edges(
Core2d,
(Node2d::EndMainPass, Node2d::Bloom, Node2d::Tonemapping),
(
Node2d::StartMainPassPostProcessing,
Node2d::Bloom,
Node2d::Tonemapping,
),
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_post_process/src/motion_blur/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl Plugin for MotionBlurPlugin {
.add_render_graph_edges(
Core3d,
(
Node3d::EndMainPass,
Node3d::StartMainPassPostProcessing,
Node3d::MotionBlur,
Node3d::Bloom, // we want blurred areas to bloom and tonemap properly.
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ They have now been given a new home in `bevy_anti_alias` and `bevy_post_process`
If you were importing FxaaPlugin, SmaaPlugin, TemporalAntiAliasPlugin, or CasPlugin from `bevy_core_pipeline` or `bevy::core_pipeline`, you must now import them from `bevy_anti_alias` or `bevy::anti_alias`.

If you were importing Bloom, AutoExposure, ChromaticAberration, DepthOfField, or MotionBlur from `bevy_core_pipeline` or `bevy::core_pipeline`, you must now import them from `bevy_post_process` or `bevy::post_process`.

Additionally, you may now order rendering passes against the new `StartMainPassPostProcessing` node.
Loading