diff options
author | Julian T <julian@jtle.dk> | 2021-02-06 23:43:06 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-02-06 23:43:06 +0100 |
commit | b64c7e972c52b7d015d661866f0cf902370343e5 (patch) | |
tree | 8d3dc9a8ae6b491b9f8f639f2d0bad6387d59069 /src/main.rs | |
parent | 0d5e6bd9363d5ed5c4f28174819fc0f5fd9aa586 (diff) |
Implement pathtracing
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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); |