Merge remote-tracking branch 'origin/master'

master
max.nuding 2022-07-11 07:33:32 +02:00
commit c90b185b8d
Failed to extract signature
1 changed files with 19 additions and 3 deletions

View File

@ -257,12 +257,28 @@ fn earth() -> Scene {
let earth_material = Arc::new(
Material::Lambertian(Lambertian::textured(Arc::new(earth_texture))));
world.push(Arc::new(Sphere {
center: Point3::new(0.0, 0.0, 0.0),
center: Point3::new(0.0, 2.0, 1.0),
radius: 2.0,
material: earth_material
}));
let look_from = Point3::new(13.0, 2.0, 3.0);
let glass = Arc::new(
Material::Dielectric(Dielectric::new(1.5)));
world.push(Arc::new(Sphere {
center: Point3::new(-0.5,1.0, -1.5),
radius: 1.0,
material: glass
}));
let noise = NoiseTexture { noise: Perlin::new(), scale: 4.0 };
let noise_material = Arc::new(Material::Lambertian(Lambertian::textured(Arc::new(noise))));
world.push(Arc::new(Sphere {
center: Point3::new(0.0, -1000.0, 0.0),
radius: 1000.0,
material: noise_material
}));
let look_from = Point3::new(10.0, 6.0, 3.0);
let look_at = Point3::new(0.0, 0.0, 0.0);
let focus_dist = 2.0;
@ -271,7 +287,7 @@ fn earth() -> Scene {
look_at,
Vec3::new(0.0, 1.0, 0.0),
DEFAULT_ASPECT_RATIO,
20.0,
40.0,
0.0,
focus_dist,
0.0,