From 9235e74dfbc41895a5f8807e1ab93508268a39ea Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 3 Feb 2021 17:54:03 +0100 Subject: Base render of surface normal, and abstract shading and tracing to the trace module --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 05d6617..9985a80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,6 @@ use pathtrace::camera::{Camera, Film}; use pathtrace::scene::Scene; +use pathtrace::trace::Tracer; use pathtrace::scene::shapes::Sphere; use pathtrace::core::{Vector2i, Vector3f}; use pathtrace::render::{RenderContext, RenderTask}; @@ -19,7 +20,9 @@ fn main() { Box::new(Sphere::new(4.0, Vector3f::new(0.0))), ); - let ctx = RenderContext { cam: &cam, scn: &scn }; + let tracer = Tracer::new(); + + let ctx = RenderContext { cam: &cam, scn: &scn, trc: &tracer }; let mut film = Film::new(res); let tile = film.get_tile(&film.frame); -- cgit v1.2.3