diff options
author | Keuin <[email protected]> | 2022-04-13 23:31:47 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-04-13 23:31:47 +0800 |
commit | e46e1c4033b9d96325de3295eb442a5b1fa19f19 (patch) | |
tree | 27a3976278b006b9dc862ba9fdd7cde338ce43e4 /aa.h | |
parent | 25ee3cfafea166f2dd155c07b5d43ba90d5bd994 (diff) |
Global diffuse lighting. (gamma not corrected)
Some operations on pixel<T>.
Make ray3 support copy semantic.
Fix vec3 operands does not filter out vec3-vec3 as parameters.
random_uv_gen generating random unit vectors.
Diffstat (limited to 'aa.h')
-rw-r--r-- | aa.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -44,13 +44,14 @@ public: remaining -= n; for (unsigned i = 0; i < n; ++i) { workers.emplace_back(std::thread{ - [&](int tid, uint64_t seed, std::vector<basic_viewport<T>> *subs, vec3d viewpoint, + [&](int tid, uint64_t seed, uint64_t diffuse_seed, std::vector<basic_viewport<T>> *subs, vec3d viewpoint, uint16_t image_width, uint16_t image_height) { bias_ctx bc{seed}; - auto image = (*subs)[tid].render(world, viewpoint, image_width, image_height, bc); + auto image = (*subs)[tid].render( + world, viewpoint, image_width, image_height, bc, diffuse_seed); images[base + tid] = image; }, - i, seedgen(), subviews, viewpoint, image_width, image_height + i, seedgen(), seedgen(), subviews, viewpoint, image_width, image_height }); } for (auto &th: workers) { |