fixed cam pos
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -111,17 +111,17 @@ fn ray_color(r: Ray, world: &dyn Hittable, depth: i32) -> Color {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// Image
|
// Image
|
||||||
let aspect_ratio: f64 = 1.0 / 1.0;
|
let aspect_ratio: f64 = 16. / 9.;
|
||||||
let image_height: i32 = 1000;
|
let image_width: i32 = 2560;
|
||||||
let image_width: i32 = (image_height as f64 / aspect_ratio as f64) as i32;
|
let image_height: i32 = (image_width as f64 / aspect_ratio as f64) as i32;
|
||||||
let samples_per_pixel: i32 = 50;
|
let samples_per_pixel: i32 = 5;
|
||||||
let max_depth: i32 = 4;
|
let max_depth: i32 = 4;
|
||||||
|
|
||||||
// World
|
// World
|
||||||
let world = random_scene();
|
let world = random_scene();
|
||||||
|
|
||||||
// Camera
|
// Camera
|
||||||
let lookfrom = Point3::new(-13.0, 2.0, 3.0);
|
let lookfrom = Point3::new(13.0, 2.0, 3.0);
|
||||||
let lookat = Point3::new(0.0, 0.0, 0.0);
|
let lookat = Point3::new(0.0, 0.0, 0.0);
|
||||||
let vup = Vec3::new(0.0, 1.0, 0.0);
|
let vup = Vec3::new(0.0, 1.0, 0.0);
|
||||||
let dist_to_focus = 10.0; //(lookfrom-lookat).length_squared();
|
let dist_to_focus = 10.0; //(lookfrom-lookat).length_squared();
|
||||||
|
|||||||
Reference in New Issue
Block a user