Remove vestigal option and extraneous use statements.
This commit is contained in:
parent
bf9e226899
commit
23ac418dcb
@ -32,7 +32,7 @@ fn main() -> Result<(), std::io::Error> {
|
|||||||
.start(pprof_path.to_str().unwrap().as_bytes())
|
.start(pprof_path.to_str().unwrap().as_bytes())
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
let res = render(scene, &opt.output, opt.store_intermediate);
|
let res = render(scene, &opt.output);
|
||||||
if let Some(pprof_path) = opt.pprof {
|
if let Some(pprof_path) = opt.pprof {
|
||||||
info!("Saving pprof to {}", pprof_path.to_string_lossy());
|
info!("Saving pprof to {}", pprof_path.to_string_lossy());
|
||||||
PROFILER.lock().unwrap().stop().unwrap();
|
PROFILER.lock().unwrap().stop().unwrap();
|
||||||
|
|||||||
@ -20,7 +20,6 @@ use hitable::Hit;
|
|||||||
use ray::Ray;
|
use ray::Ray;
|
||||||
use scenes;
|
use scenes;
|
||||||
use texture::EnvMap;
|
use texture::EnvMap;
|
||||||
use texture::Texture;
|
|
||||||
use vec3::Vec3;
|
use vec3::Vec3;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
@ -101,9 +100,6 @@ pub struct Opt {
|
|||||||
/// Use acceleration data structure, may be BVH or kd-tree depending on scene.
|
/// Use acceleration data structure, may be BVH or kd-tree depending on scene.
|
||||||
#[structopt(long = "use_accel")]
|
#[structopt(long = "use_accel")]
|
||||||
pub use_accel: bool,
|
pub use_accel: bool,
|
||||||
/// Store intermediate images when -s > 1
|
|
||||||
#[structopt(long = "store_intermediate")]
|
|
||||||
pub store_intermediate: bool,
|
|
||||||
|
|
||||||
/// Output directory
|
/// Output directory
|
||||||
#[structopt(parse(from_os_str), default_value = "/tmp/tracer")]
|
#[structopt(parse(from_os_str), default_value = "/tmp/tracer")]
|
||||||
@ -213,11 +209,7 @@ fn render_worker(
|
|||||||
trace!(target: "renderer", "Shutting down worker {}", tid);
|
trace!(target: "renderer", "Shutting down worker {}", tid);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render(
|
pub fn render(scene: Scene, output_dir: &Path) -> std::result::Result<(), std::io::Error> {
|
||||||
scene: Scene,
|
|
||||||
output_dir: &Path,
|
|
||||||
store_intermediate: bool,
|
|
||||||
) -> std::result::Result<(), std::io::Error> {
|
|
||||||
let (pixel_req_tx, pixel_req_rx) = channel::unbounded();
|
let (pixel_req_tx, pixel_req_rx) = channel::unbounded();
|
||||||
let (pixel_resp_tx, pixel_resp_rx) = channel::unbounded();
|
let (pixel_resp_tx, pixel_resp_rx) = channel::unbounded();
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ pub fn new(opt: &Opt) -> Scene {
|
|||||||
lookfrom,
|
lookfrom,
|
||||||
lookat,
|
lookat,
|
||||||
Vec3::new(0., 1., 0.),
|
Vec3::new(0., 1., 0.),
|
||||||
20.,
|
50.,
|
||||||
opt.width as f32 / opt.height as f32,
|
opt.width as f32 / opt.height as f32,
|
||||||
aperture,
|
aperture,
|
||||||
dist_to_focus,
|
dist_to_focus,
|
||||||
|
|||||||
@ -7,7 +7,6 @@ use hitable::Hit;
|
|||||||
use hitable_list::HitableList;
|
use hitable_list::HitableList;
|
||||||
use kdtree::KDTree;
|
use kdtree::KDTree;
|
||||||
use material::Lambertian;
|
use material::Lambertian;
|
||||||
use noise::lode::Lode;
|
|
||||||
use noise::perlin::Perlin;
|
use noise::perlin::Perlin;
|
||||||
use noise::NoiseType;
|
use noise::NoiseType;
|
||||||
use renderer::Opt;
|
use renderer::Opt;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user