From 484b2d02f34f010e38560d9a62576aa693725da2 Mon Sep 17 00:00:00 2001 From: LastMC Date: Thu, 23 May 2024 21:23:16 +0800 Subject: [PATCH] remove unnecessary effective --- src/integrators/gpt.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/integrators/gpt.cpp b/src/integrators/gpt.cpp index 15561245..d593ddf5 100644 --- a/src/integrators/gpt.cpp +++ b/src/integrators/gpt.cpp @@ -776,7 +776,7 @@ luisa::unique_ptr GradientPathTracing::build( main.add_radiance(main_emitter_radiance * main_weight * main_bsdf_result.sample.eval.f); } - $for (i, 4) { + for (auto &&i : dsl::dynamic_range(4u)) { auto shifted = load_ray_state(i); SampledSpectrum shifted_emitter_radiance{swl.dimension(), 0.f}; @@ -1112,9 +1112,6 @@ void GradientPathTracingInstance::_render_one_camera( } // This is sum(x^2)/spp. if Var(mean(x)) is need, it is sum(x^2)/(n(n-1)) - mean(x)^2/(n-1) image_buffers.emplace("variance", luisa::make_unique(pipeline(), resolution)); - image_buffers.emplace("variance_effective", luisa::make_unique(pipeline(), resolution)); - // Effective spps of G-PT - image_buffers.emplace("effective", luisa::make_unique(pipeline(), resolution)); auto clear_image_buffer = [&] { for (auto &[_, buffer] : image_buffers) { @@ -1155,9 +1152,6 @@ void GradientPathTracingInstance::_render_one_camera( auto L = pipeline().spectrum()->srgb(eval.swl, 2.f * eval.neighbor_throughput[i]); // camera->film()->accumulate(current_pixel, shutter_weight * L, 1.f); current_frame_buffer.accumulate(current_pixel, shutter_weight * L, 1.f); - $if (eval.shift_success[i]) { - image_buffers.at("effective")->accumulate(current_pixel, make_float3(1.f), 1.f); - }; }; } auto L = pipeline().spectrum()->srgb(eval.swl, 8.f * eval.very_direct + 2.f * eval.throughput);