Skip to content

Commit

Permalink
Skip tonemapping in case it is none (#13679)
Browse files Browse the repository at this point in the history
# Objective
Skip unnecessary blit then tonemapping is set to none.

## Testing
Only tested locally on our app.

## Changelog

Changed tonemapping not to execute in case it is set to none.

Co-authored-by: Lukas Chodosevicius <lukaschodosevicius@Lukass-MacBook-Pro.local>
  • Loading branch information
lukaschod and Lukas Chodosevicius authored Jun 5, 2024
1 parent bd6acc6 commit 2b20af6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_core_pipeline/src/tonemapping/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ impl ViewNode for TonemappingNode {
let view_uniforms = &view_uniforms_resource.uniforms;
let view_uniforms_id = view_uniforms.buffer().unwrap().id();

if *tonemapping == Tonemapping::None {
return Ok(());
}

if !target.is_hdr() {
return Ok(());
}
Expand Down

0 comments on commit 2b20af6

Please sign in to comment.