summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/benoit/benoit/application/render.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/benoit/benoit/application/render.rs b/source/benoit/benoit/application/render.rs
index cc5b9ce..f612df2 100644
--- a/source/benoit/benoit/application/render.rs
+++ b/source/benoit/benoit/application/render.rs
@@ -82,7 +82,15 @@ impl Application {
let iteration_count = data[pixel as usize];
- let factor = iteration_count as f32 / 64.0 % 1.0;
+ let factor = {
+ let factor = iteration_count as f32 / 64.0 % 1.0;
+
+ (if factor >= 1.0 / 2.0 {
+ 1.0 - factor
+ } else {
+ factor
+ }) * 2.0
+ };
let value: u8 = if iteration_count != self.maximum_iteration_count {
(factor * 255.0).round() as u8