bevy_core_pipeline/
lib.rs1#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
2#![forbid(unsafe_code)]
3#![cfg_attr(docsrs, feature(doc_cfg))]
4#![doc(
5 html_logo_url = "https://bevy.org/assets/icon.png",
6 html_favicon_url = "https://bevy.org/assets/icon.png"
7)]
8
9pub mod blit;
10pub mod core_2d;
11pub mod core_3d;
12pub mod deferred;
13pub mod experimental;
14pub mod oit;
15pub mod prepass;
16pub mod tonemapping;
17pub mod upscaling;
18
19pub use fullscreen_vertex_shader::FullscreenShader;
20pub use skybox::Skybox;
21
22mod fullscreen_vertex_shader;
23mod skybox;
24
25use crate::{
26 blit::BlitPlugin, core_2d::Core2dPlugin, core_3d::Core3dPlugin,
27 deferred::copy_lighting_id::CopyDeferredLightingIdPlugin,
28 experimental::mip_generation::MipGenerationPlugin, tonemapping::TonemappingPlugin,
29 upscaling::UpscalingPlugin,
30};
31use bevy_app::{App, Plugin};
32use bevy_asset::embedded_asset;
33use bevy_render::RenderApp;
34use oit::OrderIndependentTransparencyPlugin;
35
36#[derive(Default)]
37pub struct CorePipelinePlugin;
38
39impl Plugin for CorePipelinePlugin {
40 fn build(&self, app: &mut App) {
41 embedded_asset!(app, "fullscreen_vertex_shader/fullscreen.wgsl");
42
43 app.add_plugins((Core2dPlugin, Core3dPlugin, CopyDeferredLightingIdPlugin))
44 .add_plugins((
45 BlitPlugin,
46 TonemappingPlugin,
47 UpscalingPlugin,
48 OrderIndependentTransparencyPlugin,
49 MipGenerationPlugin,
50 ));
51 let Some(render_app) = app.get_sub_app_mut(RenderApp) else {
52 return;
53 };
54 render_app.init_resource::<FullscreenShader>();
55 }
56}