From 23ac418dcb40f053f185d476107a8b12480292f5 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Tue, 5 Feb 2019 19:55:31 -0800 Subject: [PATCH] Remove vestigal option and extraneous use statements. --- rtiow/src/bin/tracer.rs | 2 +- rtiow/src/renderer.rs | 10 +--------- rtiow/src/scenes/book.rs | 2 +- rtiow/src/scenes/perlin_debug.rs | 1 - 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/rtiow/src/bin/tracer.rs b/rtiow/src/bin/tracer.rs index f9f1ec8..b745dcf 100644 --- a/rtiow/src/bin/tracer.rs +++ b/rtiow/src/bin/tracer.rs @@ -32,7 +32,7 @@ fn main() -> Result<(), std::io::Error> { .start(pprof_path.to_str().unwrap().as_bytes()) .unwrap(); } - let res = render(scene, &opt.output, opt.store_intermediate); + let res = render(scene, &opt.output); if let Some(pprof_path) = opt.pprof { info!("Saving pprof to {}", pprof_path.to_string_lossy()); PROFILER.lock().unwrap().stop().unwrap(); diff --git a/rtiow/src/renderer.rs b/rtiow/src/renderer.rs index 8b12d51..22732c4 100644 --- a/rtiow/src/renderer.rs +++ b/rtiow/src/renderer.rs @@ -20,7 +20,6 @@ use hitable::Hit; use ray::Ray; use scenes; use texture::EnvMap; -use texture::Texture; use vec3::Vec3; #[derive(Debug)] @@ -101,9 +100,6 @@ pub struct Opt { /// Use acceleration data structure, may be BVH or kd-tree depending on scene. #[structopt(long = "use_accel")] pub use_accel: bool, - /// Store intermediate images when -s > 1 - #[structopt(long = "store_intermediate")] - pub store_intermediate: bool, /// Output directory #[structopt(parse(from_os_str), default_value = "/tmp/tracer")] @@ -213,11 +209,7 @@ fn render_worker( trace!(target: "renderer", "Shutting down worker {}", tid); } -pub fn render( - scene: Scene, - output_dir: &Path, - store_intermediate: bool, -) -> std::result::Result<(), std::io::Error> { +pub fn render(scene: Scene, output_dir: &Path) -> std::result::Result<(), std::io::Error> { let (pixel_req_tx, pixel_req_rx) = channel::unbounded(); let (pixel_resp_tx, pixel_resp_rx) = channel::unbounded(); diff --git a/rtiow/src/scenes/book.rs b/rtiow/src/scenes/book.rs index 3bb66c5..9aabdf4 100644 --- a/rtiow/src/scenes/book.rs +++ b/rtiow/src/scenes/book.rs @@ -28,7 +28,7 @@ pub fn new(opt: &Opt) -> Scene { lookfrom, lookat, Vec3::new(0., 1., 0.), - 20., + 50., opt.width as f32 / opt.height as f32, aperture, dist_to_focus, diff --git a/rtiow/src/scenes/perlin_debug.rs b/rtiow/src/scenes/perlin_debug.rs index 8f5abb4..9248808 100644 --- a/rtiow/src/scenes/perlin_debug.rs +++ b/rtiow/src/scenes/perlin_debug.rs @@ -7,7 +7,6 @@ use hitable::Hit; use hitable_list::HitableList; use kdtree::KDTree; use material::Lambertian; -use noise::lode::Lode; use noise::perlin::Perlin; use noise::NoiseType; use renderer::Opt;