diff options
author | Silas Bartha <silas@exvacuum.dev> | 2024-06-03 21:10:39 -0400 |
---|---|---|
committer | Silas Bartha <silas@exvacuum.dev> | 2024-06-03 21:10:39 -0400 |
commit | 369cac3c3245214ebf9d03e33e98fb68acb96c10 (patch) | |
tree | 27c0455b7510bd20fef702410e870ce05759f836 /src/nodes.rs | |
parent | 6dec61d81f0475560f336f17ab1243796d585317 (diff) |
Renamed + Added docs
Diffstat (limited to 'src/nodes.rs')
-rw-r--r-- | src/nodes.rs | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/nodes.rs b/src/nodes.rs index b33b2a0..377718a 100644 --- a/src/nodes.rs +++ b/src/nodes.rs @@ -1,8 +1,22 @@ -use bevy::{prelude::*, render::{render_graph::{ViewNode, NodeRunError, RenderGraphContext, RenderLabel}, view::ViewTarget, renderer::RenderContext, render_resource::{PipelineCache, BindGroupEntries, RenderPassDescriptor, RenderPassColorAttachment, Operations}, render_asset::RenderAssets}, ecs::query::QueryItem}; +use bevy::{ + ecs::query::QueryItem, + prelude::*, + render::{ + render_asset::RenderAssets, + render_graph::{NodeRunError, RenderGraphContext, RenderLabel, ViewNode}, + render_resource::{ + BindGroupEntries, Operations, PipelineCache, RenderPassColorAttachment, + RenderPassDescriptor, + }, + renderer::RenderContext, + view::ViewTarget, + }, +}; use super::components; use super::resources; +/// Label for dither post-process effect render node. #[derive(RenderLabel, Clone, Eq, PartialEq, Hash, Debug)] pub struct DitherRenderLabel; @@ -31,7 +45,10 @@ impl ViewNode for DitherRenderNode { let post_process = view_target.post_process_write(); - let Some(threshold_map) = world.resource::<RenderAssets<Image>>().get(dither_post_process_settings.handle()) else { + let Some(threshold_map) = world + .resource::<RenderAssets<Image>>() + .get(dither_post_process_settings.handle()) + else { warn!("Failed to get threshold map, skipping..."); return Ok(()); }; |