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 fullscreen_material;
15pub mod oit;
16pub mod prepass;
17pub mod tonemapping;
18pub mod upscaling;
19
20pub use fullscreen_vertex_shader::FullscreenShader;
21pub use skybox::Skybox;
22
23mod fullscreen_vertex_shader;
24mod skybox;
25
26use crate::{
27 blit::BlitPlugin, core_2d::Core2dPlugin, core_3d::Core3dPlugin,
28 deferred::copy_lighting_id::CopyDeferredLightingIdPlugin,
29 experimental::mip_generation::MipGenerationPlugin, tonemapping::TonemappingPlugin,
30 upscaling::UpscalingPlugin,
31};
32use bevy_app::{App, Plugin};
33use bevy_asset::embedded_asset;
34use bevy_render::RenderApp;
35use oit::OrderIndependentTransparencyPlugin;
36
37#[derive(Default)]
38pub struct CorePipelinePlugin;
39
40impl Plugin for CorePipelinePlugin {
41 fn build(&self, app: &mut App) {
42 embedded_asset!(app, "fullscreen_vertex_shader/fullscreen.wgsl");
43
44 app.add_plugins((Core2dPlugin, Core3dPlugin, CopyDeferredLightingIdPlugin))
45 .add_plugins((
46 BlitPlugin,
47 TonemappingPlugin,
48 UpscalingPlugin,
49 OrderIndependentTransparencyPlugin,
50 MipGenerationPlugin,
51 ));
52 let Some(render_app) = app.get_sub_app_mut(RenderApp) else {
53 return;
54 };
55 render_app.init_resource::<FullscreenShader>();
56 }
57}