Skip to content

Commit

Permalink
return hdr texture view as output from shading MainPass3d node
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann committed Dec 24, 2021
1 parent a08ebb1 commit 45865f1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions crates/bevy_core_pipeline/src/main_pass_3d.rs
Expand Up @@ -23,6 +23,7 @@ pub struct MainPass3dNode {

impl MainPass3dNode {
pub const IN_VIEW: &'static str = "view";
pub const OUT_HDR: &'static str = "hdr";

pub fn new(world: &mut World) -> Self {
Self {
Expand All @@ -36,6 +37,13 @@ impl Node for MainPass3dNode {
vec![SlotInfo::new(MainPass3dNode::IN_VIEW, SlotType::Entity)]
}

fn output(&self) -> Vec<SlotInfo> {
vec![SlotInfo::new(
MainPass3dNode::OUT_HDR,
SlotType::TextureView,
)]
}

fn update(&mut self, world: &mut World) {
self.query.update_archetypes(world);
}
Expand Down Expand Up @@ -160,6 +168,10 @@ impl Node for MainPass3dNode {
}
}

graph
.set_output(MainPass3dNode::OUT_HDR, target.hdr_texture.clone())
.unwrap();

Ok(())
}
}

0 comments on commit 45865f1

Please sign in to comment.