bevy_core_pipeline/
lib.rs

1// FIXME(15321): solve CI failures, then replace with `#![expect()]`.
2#![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")]
3#![forbid(unsafe_code)]
4#![cfg_attr(docsrs, feature(doc_auto_cfg))]
5#![doc(
6    html_logo_url = "https://bevyengine.org/assets/icon.png",
7    html_favicon_url = "https://bevyengine.org/assets/icon.png"
8)]
9
10pub mod auto_exposure;
11pub mod blit;
12pub mod bloom;
13pub mod contrast_adaptive_sharpening;
14pub mod core_2d;
15pub mod core_3d;
16pub mod deferred;
17pub mod dof;
18pub mod fullscreen_vertex_shader;
19pub mod fxaa;
20pub mod motion_blur;
21pub mod msaa_writeback;
22pub mod oit;
23pub mod post_process;
24pub mod prepass;
25mod skybox;
26pub mod smaa;
27mod taa;
28pub mod tonemapping;
29pub mod upscaling;
30
31pub use skybox::Skybox;
32
33/// Experimental features that are not yet finished. Please report any issues you encounter!
34///
35/// Expect bugs, missing features, compatibility issues, low performance, and/or future breaking changes.
36pub mod experimental {
37    #[expect(deprecated)]
38    pub mod taa {
39        pub use crate::taa::{
40            TemporalAntiAliasBundle, TemporalAntiAliasNode, TemporalAntiAliasPlugin,
41            TemporalAntiAliasSettings, TemporalAntiAliasing,
42        };
43    }
44}
45
46/// The core pipeline prelude.
47///
48/// This includes the most common types in this crate, re-exported for your convenience.
49#[expect(deprecated)]
50pub mod prelude {
51    #[doc(hidden)]
52    pub use crate::{
53        core_2d::{Camera2d, Camera2dBundle},
54        core_3d::{Camera3d, Camera3dBundle},
55    };
56}
57
58use crate::{
59    blit::BlitPlugin,
60    bloom::BloomPlugin,
61    contrast_adaptive_sharpening::CasPlugin,
62    core_2d::Core2dPlugin,
63    core_3d::Core3dPlugin,
64    deferred::copy_lighting_id::CopyDeferredLightingIdPlugin,
65    dof::DepthOfFieldPlugin,
66    fullscreen_vertex_shader::FULLSCREEN_SHADER_HANDLE,
67    fxaa::FxaaPlugin,
68    motion_blur::MotionBlurPlugin,
69    msaa_writeback::MsaaWritebackPlugin,
70    post_process::PostProcessingPlugin,
71    prepass::{DeferredPrepass, DepthPrepass, MotionVectorPrepass, NormalPrepass},
72    smaa::SmaaPlugin,
73    tonemapping::TonemappingPlugin,
74    upscaling::UpscalingPlugin,
75};
76use bevy_app::{App, Plugin};
77use bevy_asset::load_internal_asset;
78use bevy_render::prelude::Shader;
79use oit::OrderIndependentTransparencyPlugin;
80
81#[derive(Default)]
82pub struct CorePipelinePlugin;
83
84impl Plugin for CorePipelinePlugin {
85    fn build(&self, app: &mut App) {
86        load_internal_asset!(
87            app,
88            FULLSCREEN_SHADER_HANDLE,
89            "fullscreen_vertex_shader/fullscreen.wgsl",
90            Shader::from_wgsl
91        );
92
93        app.register_type::<DepthPrepass>()
94            .register_type::<NormalPrepass>()
95            .register_type::<MotionVectorPrepass>()
96            .register_type::<DeferredPrepass>()
97            .add_plugins((
98                Core2dPlugin,
99                Core3dPlugin,
100                CopyDeferredLightingIdPlugin,
101                BlitPlugin,
102                MsaaWritebackPlugin,
103                TonemappingPlugin,
104                UpscalingPlugin,
105                BloomPlugin,
106                FxaaPlugin,
107                CasPlugin,
108                MotionBlurPlugin,
109                DepthOfFieldPlugin,
110                SmaaPlugin,
111                PostProcessingPlugin,
112                OrderIndependentTransparencyPlugin,
113            ));
114    }
115}