diff options
author | eug-vs <eugene@eug-vs.xyz> | 2021-10-28 20:08:25 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2021-10-29 01:37:29 +0300 |
commit | ea0e4d78415a7876803b6c83e3b95aade2d999b9 (patch) | |
tree | 2e7f4613cb24ea6cdfabd10a248fa6803439f3b2 | |
parent | 974536dfc3fef1ea28bd9d71930ac2894e0c6d1c (diff) | |
download | pistol-ea0e4d78415a7876803b6c83e3b95aade2d999b9.tar.gz |
fix: use camera brightness
-rw-r--r-- | src/camera.rs | 4 | ||||
-rw-r--r-- | src/main.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/camera.rs b/src/camera.rs index 8768ace..8409ea5 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -9,7 +9,7 @@ use std::time::Instant; type Vector = Vector3<f32>; -pub const HEIGHT: i32 = 60; +pub const HEIGHT: i32 = 50; pub const WIDTH: i32 = HEIGHT * 3; #[derive(Debug)] @@ -154,7 +154,7 @@ impl Camera { let mut dist = 0.0; let mut count = 0; - while dist < 8.0 && count < 10 { + while dist < self.brightness && count < 10 { count += 1; dist = self.sdf(point); if dist.abs() < threshold { diff --git a/src/main.rs b/src/main.rs index aa5a456..e0b0fd9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,7 @@ fn main() { angle: PI / 2.0, distance: 1.0, aspect_ratio: 2.0 * HEIGHT as f32 / WIDTH as f32, - brightness: 5.0, + brightness: 15.0, time: 0.0, speed: 0.5, turn_rate: 30.0, |