Skip to content

Commit

Permalink
Fix mandlebrot example with double-precision
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Feb 15, 2022
1 parent 896470a commit adf5d02
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions examples/mandlebrot/mandlebrot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,14 @@ impl Default for PushConstants {
}
impl PushConstants {
fn set(&mut self, p: DVec2, q: DVec2, iterations: i32) {
self.p = p.cast_approx();
self.q = q.cast_approx();
#[cfg(feature = "shader64")] {
self.p = p;
self.q = q;
}
#[cfg(not(feature = "shader64"))] {
self.p = p.cast_approx();
self.q = q.cast_approx();
}
self.iterations = iterations;
}
}
Expand Down

0 comments on commit adf5d02

Please sign in to comment.