From b64c7e972c52b7d015d661866f0cf902370343e5 Mon Sep 17 00:00:00 2001 From: Julian T Date: Sat, 6 Feb 2021 23:43:06 +0100 Subject: Implement pathtracing --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index c3d11e8..c6bc14e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use pathtrace::camera::{Camera, Film, CameraSettings}; use pathtrace::scene::Scene; -use pathtrace::trace::Tracer; +use pathtrace::trace::DefaultTracer; use pathtrace::scene::shapes::Sphere; use pathtrace::core::{Vector2i, Vector3f}; use pathtrace::render::{RenderContext, RenderTask}; @@ -23,11 +23,11 @@ fn main() { Box::new(Sphere::new(100.0, Vector3f::new_xyz(0.0, -100.5, -1.0))), ]); - let tracer = Tracer::new(); + let tracer = DefaultTracer::new(&scn, None); let mut sampler = UniformSampler::new(); - let ctx = RenderContext { cam: &cam, scn: &scn, trc: &tracer }; + let ctx = RenderContext { cam: &cam, trc: &tracer }; let mut film = Film::new(res); let tile = film.get_tile(&film.frame); -- cgit v1.2.3