Skip to content

Commit

Permalink
gpu: Use dirty flag to decide whether to re-trace in `RaytraceToTextu…
Browse files Browse the repository at this point in the history
…re`.
  • Loading branch information
kpreid committed Nov 24, 2024
1 parent cf8b77a commit 3b3186c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions all-is-cubes-gpu/src/in_wgpu/raytrace_to_texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ impl RaytraceToTexture {

impl Inner {
fn update_inputs(&mut self, cursor: Option<&Cursor>) -> Result<(), RenderError> {
self.rtr.update(cursor)?;
self.dirty();
if self.rtr.update(cursor)? {
self.dirty();
}
Ok(())
}

Expand Down

0 comments on commit 3b3186c

Please sign in to comment.