aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs41
1 files changed, 27 insertions, 14 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 12dd5bb..144dfe8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,12 +1,23 @@
-use bevy::{prelude::*, render::{RenderApp, extract_component::{UniformComponentPlugin, ExtractComponentPlugin}, render_graph::{RenderGraphApp, ViewNodeRunner}}, asset::embedded_asset, core_pipeline::core_3d::graph::{Core3d, Node3d}};
+#![warn(missing_docs)]
+
+use bevy::{
+ asset::embedded_asset,
+ core_pipeline::core_3d::graph::{Core3d, Node3d},
+ prelude::*,
+ render::{
+ extract_component::{ExtractComponentPlugin, UniformComponentPlugin},
+ render_graph::{RenderGraphApp, ViewNodeRunner},
+ RenderApp,
+ },
+};
pub use nodes::OutlineRenderLabel;
pub struct OutlinePostProcessPlugin;
pub mod components;
-mod resources;
mod nodes;
+mod resources;
impl Plugin for OutlinePostProcessPlugin {
fn build(&self, app: &mut App) {
@@ -16,24 +27,26 @@ impl Plugin for OutlinePostProcessPlugin {
UniformComponentPlugin::<components::OutlinePostProcessSettings>::default(),
ExtractComponentPlugin::<components::OutlinePostProcessSettings>::default(),
));
-
+
let Ok(render_app) = app.get_sub_app_mut(RenderApp) else {
return;
};
- render_app.add_render_graph_node::<ViewNodeRunner<nodes::OutlineRenderNode>>(
- Core3d,
- nodes::OutlineRenderLabel,
- ).add_render_graph_edges(
- Core3d,
- (
- Node3d::Tonemapping,
+ render_app
+ .add_render_graph_node::<ViewNodeRunner<nodes::OutlineRenderNode>>(
+ Core3d,
nodes::OutlineRenderLabel,
- Node3d::EndMainPassPostProcessing,
- ),
- );
+ )
+ .add_render_graph_edges(
+ Core3d,
+ (
+ Node3d::Tonemapping,
+ nodes::OutlineRenderLabel,
+ Node3d::EndMainPassPostProcessing,
+ ),
+ );
}
-
+
fn finish(&self, app: &mut App) {
let Ok(render_app) = app.get_sub_app_mut(RenderApp) else {
return;