diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2020-12-21 23:13:25 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2020-12-21 23:13:25 +0100 |
| commit | 8da53c5f262b09756e1a93257cdcd5be25807839 (patch) | |
| tree | c34344074ca8766dafcbf27958f571bf14c35315 /src/main.cpp | |
| parent | 56bed8e38f5b6d9effd77371ad781ae71601205b (diff) | |
Movable and rotatable camera + dielectric materials
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9718d3e..92dc01f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,19 +35,20 @@ int main() { const uint32_t samples_per_pixel = 100; const uint32_t max_depth = 100; - camera camera { {}, aspect_ratio, 1.0 }; + camera camera { { /*-2.0, 2.0, 1.0*/ }, { 0.0, 0.0, -1.0 }, 90.0, aspect_ratio }; // World hittable objects hittable_list world {}; auto material_ground = std::make_shared<lambertian>(color(0.8, 0.8, 0.0)); auto material_center = std::make_shared<lambertian>(color(0.7, 0.3, 0.3)); - auto material_left = std::make_shared<metal>(color(0.8, 0.8, 0.8), 0.3); + auto material_left = std::make_shared<dielectric>(1.5); auto material_right = std::make_shared<metal>(color(0.8, 0.6, 0.2), 1.0); world.add(std::make_shared<sphere>(point3( 0.0, -100.5, -1.0), 100.0, material_ground)); world.add(std::make_shared<sphere>(point3( 0.0, 0.0, -1.0), 0.5, material_center)); world.add(std::make_shared<sphere>(point3(-1.0, 0.0, -1.0), 0.5, material_left)); + world.add(std::make_shared<sphere>(point3(-1.0, 0.0, -1.0), -0.4, material_left)); world.add(std::make_shared<sphere>(point3( 1.0, 0.0, -1.0), 0.5, material_right)); // PPM format header |
