cvkg_render_gpu/passes/
tonemap.rs1use crate::kvasir::node::{ExecutionContext, KvasirNode};
2use crate::kvasir::nodes::{PassId, RES_SCENE};
3
4pub struct ToneMapNode {
8 pub inputs: Vec<crate::kvasir::resource::ResourceId>,
9 pub outputs: Vec<crate::kvasir::resource::ResourceId>,
10 pub target_view: Option<wgpu::TextureView>,
11}
12
13impl ToneMapNode {
14 pub fn new() -> Self {
15 Self {
16 inputs: vec![RES_SCENE],
17 outputs: vec![RES_SCENE],
18 target_view: None,
19 }
20 }
21}
22
23impl KvasirNode for ToneMapNode {
24 fn label(&self) -> &'static str {
25 "ToneMap"
26 }
27
28 fn inputs(&self) -> &[crate::kvasir::resource::ResourceId] {
29 &self.inputs
30 }
31
32 fn outputs(&self) -> &[crate::kvasir::resource::ResourceId] {
33 &self.outputs
34 }
35
36 fn pass_id(&self) -> PassId {
37 PassId::PostProcess {
38 pipeline_id: 0x544F4E45, }
40 }
41
42 fn execute(&self, _ctx: &mut ExecutionContext) {
43 log::trace!("[Kvasir] ToneMap: pass executed (pipeline in end_frame)");
46 }
47}