Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_core_pipeline/src/lib.rs
6604 views
1
#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
2
#![forbid(unsafe_code)]
3
#![cfg_attr(docsrs, feature(doc_auto_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
9
pub mod blit;
10
pub mod core_2d;
11
pub mod core_3d;
12
pub mod deferred;
13
pub mod experimental;
14
pub mod oit;
15
pub mod prepass;
16
pub mod tonemapping;
17
pub mod upscaling;
18
19
pub use fullscreen_vertex_shader::FullscreenShader;
20
pub use skybox::Skybox;
21
22
mod fullscreen_vertex_shader;
23
mod skybox;
24
25
use 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
};
31
use bevy_app::{App, Plugin};
32
use bevy_asset::embedded_asset;
33
use bevy_render::RenderApp;
34
use oit::OrderIndependentTransparencyPlugin;
35
36
#[derive(Default)]
37
pub struct CorePipelinePlugin;
38
39
impl 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
}
57
58