diff options
| author | ladevieq <qladevie@wanadev.fr> | 2021-02-10 14:00:37 +0100 |
|---|---|---|
| committer | ladevieq <qladevie@wanadev.fr> | 2021-02-10 14:00:37 +0100 |
| commit | 5e39b7485d08345a4eb3686b344840791888d1f9 (patch) | |
| tree | 0d2a51845709a5ecd25fecedd60cc65b2999c61e /src/utils.cpp | |
| parent | 3a43bab624f271588401daca46c512a1f85593f6 (diff) | |
Accumulation working
Diffstat (limited to 'src/utils.cpp')
| -rw-r--r-- | src/utils.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/utils.cpp b/src/utils.cpp index 00745dc..a2cf8f9 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -89,11 +89,10 @@ void random_scene(sphere *world) { world[world_sphere_index + 2] = { { 4, 1, 0 }, material3, 1.0 }; } -struct input_data create_inputs(uint32_t width, uint32_t height) { +struct input_data create_inputs(uint32_t width, uint32_t height, uint32_t samples_per_pixel) { // Image dimensions const float aspect_ratio = (float)width / (float) height; - const uint32_t samples_per_pixel = 10; const uint32_t max_depth = 5; const vec3 camera_position{ 13.0, 2.0, 3.0 }; @@ -113,7 +112,9 @@ struct input_data create_inputs(uint32_t width, uint32_t height) { .max_bounce = max_depth, .samples_per_pixel = samples_per_pixel, .width = width, - .height = height + .height = height, + + .sample_index = 0, }; // Random numbers pools |
