Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_core_pipeline/src/lib.rs
9371 views
1
#![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
9
pub mod blit;
10
pub mod core_2d;
11
pub mod core_3d;
12
pub mod deferred;
13
pub mod fullscreen_material;
14
pub mod mip_generation;
15
pub mod oit;
16
pub mod prepass;
17
pub mod schedule;
18
pub mod tonemapping;
19
pub mod upscaling;
20
21
pub use bevy_light::Skybox;
22
pub use fullscreen_vertex_shader::FullscreenShader;
23
pub use schedule::{Core2d, Core2dSystems, Core3d, Core3dSystems};
24
25
mod fullscreen_vertex_shader;
26
mod skybox;
27
28
use crate::schedule::camera_driver;
29
use crate::{
30
blit::BlitPlugin, core_2d::Core2dPlugin, core_3d::Core3dPlugin,
31
deferred::copy_lighting_id::CopyDeferredLightingIdPlugin, mip_generation::MipGenerationPlugin,
32
tonemapping::TonemappingPlugin, upscaling::UpscalingPlugin,
33
};
34
use bevy_app::{App, Plugin};
35
use bevy_asset::embedded_asset;
36
use bevy_render::renderer::RenderGraph;
37
use bevy_render::RenderApp;
38
use oit::OrderIndependentTransparencyPlugin;
39
40
#[derive(Default)]
41
pub struct CorePipelinePlugin;
42
43
impl Plugin for CorePipelinePlugin {
44
fn build(&self, app: &mut App) {
45
embedded_asset!(app, "fullscreen_vertex_shader/fullscreen.wgsl");
46
47
app.add_plugins((Core2dPlugin, Core3dPlugin, CopyDeferredLightingIdPlugin))
48
.add_plugins((
49
BlitPlugin,
50
TonemappingPlugin,
51
UpscalingPlugin,
52
OrderIndependentTransparencyPlugin,
53
MipGenerationPlugin,
54
));
55
let Some(render_app) = app.get_sub_app_mut(RenderApp) else {
56
return;
57
};
58
render_app
59
.init_resource::<FullscreenShader>()
60
.add_systems(RenderGraph, camera_driver);
61
}
62
}
63
64