fixed cam pos

This commit is contained in:
2026-02-14 03:25:19 +01:00
parent 2e92d9ed1e
commit 5bdd7d8121

View File

@@ -111,17 +111,17 @@ fn ray_color(r: Ray, world: &dyn Hittable, depth: i32) -> Color {
fn main() {
// Image
let aspect_ratio: f64 = 1.0 / 1.0;
let image_height: i32 = 1000;
let image_width: i32 = (image_height as f64 / aspect_ratio as f64) as i32;
let samples_per_pixel: i32 = 50;
let aspect_ratio: f64 = 16. / 9.;
let image_width: i32 = 2560;
let image_height: i32 = (image_width as f64 / aspect_ratio as f64) as i32;
let samples_per_pixel: i32 = 5;
let max_depth: i32 = 4;
// World
let world = random_scene();
// 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 vup = Vec3::new(0.0, 1.0, 0.0);
let dist_to_focus = 10.0; //(lookfrom-lookat).length_squared();