From e46e1c4033b9d96325de3295eb442a5b1fa19f19 Mon Sep 17 00:00:00 2001 From: Keuin Date: Wed, 13 Apr 2022 23:31:47 +0800 Subject: Global diffuse lighting. (gamma not corrected) Some operations on pixel. Make ray3 support copy semantic. Fix vec3 operands does not filter out vec3-vec3 as parameters. random_uv_gen generating random unit vectors. --- aa.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'aa.h') diff --git a/aa.h b/aa.h index 368a14a..ed3bc7f 100644 --- a/aa.h +++ b/aa.h @@ -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> *subs, vec3d viewpoint, + [&](int tid, uint64_t seed, uint64_t diffuse_seed, std::vector> *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) { -- cgit v1.2.3