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
path: root/intern
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2014-02-11 15:18:10 +0400
committerThomas Dinges <blender@dingto.org>2014-02-11 15:18:47 +0400
commit0203c5f2a2632451f4f56b43135be4108b46b559 (patch)
tree2ffd85ff78accb60b0674a62296921ec07b6c868 /intern
parent1dfd82d2bcdd28e6230878d643c19b93a31cb4cd (diff)
Cycles: Clamp Direct now affects the Background too.
Reviewed by: brecht Differential Revision: https://developer.blender.org/D306
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_accumulate.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h
index 80f3bfd33a0..a8563f9a501 100644
--- a/intern/cycles/kernel/kernel_accumulate.h
+++ b/intern/cycles/kernel/kernel_accumulate.h
@@ -324,6 +324,9 @@ ccl_device_inline float3 path_radiance_clamp_and_sum(KernelGlobals *kg, PathRadi
float3 L_direct = L->direct_diffuse + L->direct_glossy + L->direct_transmission + L->direct_subsurface + L->emission;
float3 L_indirect = L->indirect_diffuse + L->indirect_glossy + L->indirect_transmission + L->indirect_subsurface;
+
+ if(!kernel_data.background.transparent)
+ L_direct += L->background;
#ifdef __CLAMP_SAMPLE__
float clamp_direct = kernel_data.integrator.sample_clamp_direct;
@@ -343,6 +346,7 @@ ccl_device_inline float3 path_radiance_clamp_and_sum(KernelGlobals *kg, PathRadi
L->direct_transmission *= scale;
L->direct_subsurface *= scale;
L->emission *= scale;
+ L->background *= scale;
}
/* Indirect */
@@ -361,9 +365,6 @@ ccl_device_inline float3 path_radiance_clamp_and_sum(KernelGlobals *kg, PathRadi
/* Combine */
float3 L_sum = L_direct + L_indirect;
- if(!kernel_data.background.transparent)
- L_sum += L->background;
-
return L_sum;
}
else