From 4bb20e2f30fc204e67d0dce82410e0ec9e949197 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 2 Apr 2020 00:03:43 +0200 Subject: [PATCH] executable: add bidirectional renderer option --- pathtracer/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pathtracer/src/main.rs b/pathtracer/src/main.rs index 8736550..823e002 100644 --- a/pathtracer/src/main.rs +++ b/pathtracer/src/main.rs @@ -1,4 +1,4 @@ -use pathtracer::render::{Pathtracer, Raytracer}; +use pathtracer::render::{BidirectionalPathtracer, Pathtracer, Raytracer}; use pathtracer::scene::Scene; use std::path::PathBuf; use std::str; @@ -10,6 +10,7 @@ arg_enum! { enum RenderOption { Raytracer, Pathtracer, + Bidirectional, } } @@ -40,6 +41,7 @@ fn main() -> Result<(), Box> { let image = match options.renderer { RenderOption::Raytracer => Raytracer::new(scene).render(), RenderOption::Pathtracer => Pathtracer::new(scene).render(), + RenderOption::Bidirectional => BidirectionalPathtracer::new(scene).render(), }; image.save(options.output)?;