Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukasstockner97>2019-12-08 23:19:37 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-12-12 15:04:43 +0300
commit3437c9c3bf3d16a5ae070226d927a3a329239c8c (patch)
treef7ad2b332a4200caa8d57ac85199ac760fc6bfeb /intern/cycles/kernel/kernel_path_surface.h
parent85b7d397f7620b57ce4014ee7b0119eef64578d9 (diff)
Cycles: perform clamping per light contribution instead of whole path
With upcoming light group passes, for them to sum up correctly to the combined pass the clamping must be more fine grained. This also has the advantage that if one light is particularly noisy, it does not diminish the contribution from other lights which do not need as much clamping. Clamp values on existing scenes will need to be tweaked to get similar results, there is no automatic conversion possible which would give the same results as before. Implemented by Lukas, with tweaks by Brecht. Part of D4837
Diffstat (limited to 'intern/cycles/kernel/kernel_path_surface.h')
-rw-r--r--intern/cycles/kernel/kernel_path_surface.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_path_surface.h b/intern/cycles/kernel/kernel_path_surface.h
index a32690d51eb..ba48c0bdfc4 100644
--- a/intern/cycles/kernel/kernel_path_surface.h
+++ b/intern/cycles/kernel/kernel_path_surface.h
@@ -121,8 +121,14 @@ ccl_device_noinline_cpu void kernel_branched_path_surface_connect_light(
if (has_emission) {
if (!blocked) {
/* accumulate */
- path_radiance_accum_light(
- L, state, throughput * num_samples_inv, &L_light, shadow, num_samples_inv, is_lamp);
+ path_radiance_accum_light(kg,
+ L,
+ state,
+ throughput * num_samples_inv,
+ &L_light,
+ shadow,
+ num_samples_inv,
+ is_lamp);
}
else {
path_radiance_accum_total_light(L, state, throughput * num_samples_inv, &L_light);
@@ -250,7 +256,7 @@ ccl_device_inline void kernel_path_surface_connect_light(KernelGlobals *kg,
if (has_emission) {
if (!blocked) {
/* accumulate */
- path_radiance_accum_light(L, state, throughput, &L_light, shadow, 1.0f, is_lamp);
+ path_radiance_accum_light(kg, L, state, throughput, &L_light, shadow, 1.0f, is_lamp);
}
else {
path_radiance_accum_total_light(L, state, throughput, &L_light);