Skip to content

Commit

Permalink
Merge pull request #7 from cshenton-work/rt-storage
Browse files Browse the repository at this point in the history
Mark hdr render targets as STORAGE_BINDING
  • Loading branch information
ickshonpe authored Jan 30, 2024
2 parents eff47e6 + e69829b commit 37ba7fc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions crates/bevy_render/src/view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,16 @@ fn prepare_view_targets(
sample_count: 1,
dimension: TextureDimension::D2,
format: main_texture_format,
usage: TextureUsages::RENDER_ATTACHMENT
| TextureUsages::TEXTURE_BINDING
| TextureUsages::COPY_SRC,
usage: if view.hdr {
TextureUsages::RENDER_ATTACHMENT
| TextureUsages::TEXTURE_BINDING
| TextureUsages::COPY_SRC
| TextureUsages::STORAGE_BINDING
} else {
TextureUsages::RENDER_ATTACHMENT
| TextureUsages::TEXTURE_BINDING
| TextureUsages::COPY_SRC
},
view_formats: match main_texture_format {
TextureFormat::Bgra8Unorm => &[TextureFormat::Bgra8UnormSrgb],
TextureFormat::Rgba8Unorm => &[TextureFormat::Rgba8UnormSrgb],
Expand Down

0 comments on commit 37ba7fc

Please sign in to comment.