aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index c99ca58..0fe2df9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -14,7 +14,7 @@ use camera::Camera;
use hittable::Hittable;
use display::{Display, Image, Pixelflut};
use ray::Ray;
-use vec3::{Vec3, Color};
+use vec3::{Vec3, Color, Point3};
use scenes::get_scene;
struct PixelUpdate {
@@ -33,7 +33,7 @@ fn ray_color(ray: &Ray, background: &Color, world: &dyn Hittable, depth: u32) ->
}
match world.hit(ray, 0.001, f64::INFINITY) {
None => background.clone(),
- Some(rec) => {
+ Some(mut rec) => {
let mut scattered = Ray::new();
let mut attenuation = Color::new();
if let Some(material) = &rec.material {
@@ -70,7 +70,7 @@ fn main() {
//const ASPECT_RATIO: f64 = 1.0;
const IMAGE_WIDTH: u32 = 600;
const IMAGE_HEIGHT: u32 = (IMAGE_WIDTH as f64 / ASPECT_RATIO) as u32;
- const SAMPLES_PER_PIXEL: u32 = 500;
+ const SAMPLES_PER_PIXEL: u32 = 30;
const MAX_DEPTH: u32 = 50;
const THREAD_COUNT: u32 = 8;
const TIME_START: f64 = 0.0;