Skip to content

Commit 0be1529

Browse files
authored
Expose textures to ViewTarget::post_process_write() (#18348)
Extracted from my DLSS branch. ## Changelog * Added `source_texture` and `destination_texture` to `PostProcessWrite`, in addition to the existing texture views.
1 parent 5c3368f commit 0be1529

File tree

1 file changed

+6
-0
lines changed
  • crates/bevy_render/src/view

1 file changed

+6
-0
lines changed

crates/bevy_render/src/view/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,9 @@ pub struct ViewTargetAttachments(HashMap<NormalizedRenderTarget, OutputColorAtta
615615

616616
pub struct PostProcessWrite<'a> {
617617
pub source: &'a TextureView,
618+
pub source_texture: &'a Texture,
618619
pub destination: &'a TextureView,
620+
pub destination_texture: &'a Texture,
619621
}
620622

621623
impl From<ColorGrading> for ColorGradingUniform {
@@ -843,13 +845,17 @@ impl ViewTarget {
843845
self.main_textures.b.mark_as_cleared();
844846
PostProcessWrite {
845847
source: &self.main_textures.a.texture.default_view,
848+
source_texture: &self.main_textures.a.texture.texture,
846849
destination: &self.main_textures.b.texture.default_view,
850+
destination_texture: &self.main_textures.b.texture.texture,
847851
}
848852
} else {
849853
self.main_textures.a.mark_as_cleared();
850854
PostProcessWrite {
851855
source: &self.main_textures.b.texture.default_view,
856+
source_texture: &self.main_textures.b.texture.texture,
852857
destination: &self.main_textures.a.texture.default_view,
858+
destination_texture: &self.main_textures.a.texture.texture,
853859
}
854860
}
855861
}

0 commit comments

Comments
 (0)