Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Leo-Smith committed Oct 30, 2023
1 parent 3827685 commit 2316e3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/integrators/gpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ void GradientPathTracingInstance::_render_one_camera(
auto mean_x = camera->film()->read(pixel_id).average; // mean(x) = 1/n * sum(x)
auto mean_x2 = image_buffers.at("variance")->read(pixel_id);// mean(x^2) = 1/n * sum(x^2)
auto var = (mean_x2 - mean_x * mean_x) / (n - 1.f); // var(x) = 1/(n-1) * (sum(x^2) - n * mean(x)^2)
image_buffers.at("variance")->write(pixel_id, var);
image_buffers.at("variance")->write(pixel_id, max(var, 0.f));
};

Clock clock_compile;
Expand Down

0 comments on commit 2316e3c

Please sign in to comment.