aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-02-03 17:54:03 +0100
committerJulian T <julian@jtle.dk>2021-02-03 17:54:03 +0100
commit9235e74dfbc41895a5f8807e1ab93508268a39ea (patch)
treeb8e85390b9e131736016dd2589d5e6ea14013552 /src/main.rs
parent977b0e4152433b2a68e2b97fe5fe2c0ff6fb20d8 (diff)
Base render of surface normal, and abstract shading and tracing to the
trace module
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
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);