Fix more bugs
This commit is contained in:
parent
9e328cf9e3
commit
ef6013ce4f
4 changed files with 18 additions and 15 deletions
|
|
@ -115,13 +115,15 @@ void ApplicationIntegrator::mltRender(int *pixels, int width, int height,
|
|||
|
||||
if ((last_l[i] == 0.0 && l > 0.0) || (last_l[i] > 0.0 && RandomSampler_get1D(chains[i].sampler) < l / last_l[i])) {
|
||||
data.film.addSplat(x_pixel, y_pixel, f / l);
|
||||
// printf("accept %d\n", chains[i].is_large_step());
|
||||
// if (i == 0)
|
||||
// printf("%d accept %d %f %f %f\n", i, chains[i].is_large_step(), last_l[i], l, l / last_l[i]);
|
||||
chains[i].accept();
|
||||
accepted.fetch_add(1, std::memory_order_relaxed);
|
||||
last_l[i] = l;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
large_luminance_outer_sum += large_luminance_sum;
|
||||
}
|
||||
std::lock_guard<std::mutex> guard(large_step_global_luminance_mutex);
|
||||
|
|
@ -135,7 +137,7 @@ void ApplicationIntegrator::mltRender(int *pixels, int width, int height,
|
|||
data.film.scalar = (float)(width * height) * large_step_global_luminance / (accepted.load(std::memory_order_relaxed) * luminance_count.load(std::memory_order_relaxed));
|
||||
|
||||
|
||||
printf("%f\n", data.film.scalar);
|
||||
printf("%f, %f, %zu, %d\n", data.film.scalar, large_step_global_luminance / luminance_count.load(std::memory_order_relaxed), luminance_count.load(std::memory_order_relaxed), NUM_CHAINS);
|
||||
}
|
||||
|
||||
void ApplicationIntegrator::mcRender(int *pixels, int width, int height,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue