aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-01-03 23:36:59 +0100
committerladevieq <ladevie.quentin@gmail.com>2021-01-03 23:36:59 +0100
commit08f2f11ce8c3eee1c6548fa69f4d5bd1931bf839 (patch)
tree5f017bd2f17bbd0bfd56dbf4d0cc62fcd29c9030 /src/main.cpp
parent10ee4be624e665db9ad83c6bf877c6c5b5e3d443 (diff)
Lambertian material with random numbers patern repetition artifact
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8811c78..a10ff7e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -82,7 +82,7 @@ int main() {
// Image dimensions
// const float aspect_ratio = 16.0 / 9.0;
- const float aspect_ratio = 1.0 / 1.0;
+ const float aspect_ratio = 1.0;
const size_t width = 400;
const size_t height = width / aspect_ratio;
const uint32_t samples_per_pixel = 100;
@@ -102,8 +102,11 @@ int main() {
.viewport_width = 2.f * aspect_ratio,
.viewport_height = 2.f,
.proj_plane_distance = 1.f,
- .sphere = { { 0.f, 0.f, -1.f }, 0.5f },
- // .sphere = { { 0.f, -100.5f, -1.f }, 100.f },
+ .spheres = {
+ { { 0.f, 0.f, -1.f }, { { 0.f, 0.f, 1.f }, }, 0.5f },
+ { { 0.f, -100.5f, -1.f }, { { 0.f, 1.f, 0.f }, }, 100.f }
+ },
+ .max_bounce = 50,
};
for (size_t rand_number_index = 0; rand_number_index < samples_per_pixel * 2; rand_number_index++) {