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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-28 16:18:12 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-28 16:18:12 +0400
commite12adeb8c98d0ef211aba2cb5c0e87ff775fe217 (patch)
tree3a4381971596645f55401490e19a3672b28745ec /intern/cycles/kernel/kernel_passes.h
parented61bfc9a6580360805a3daae1003df43a7f2c11 (diff)
Fix #30551: cycles passes combining did not always give identical result combined
with antialiasing/defocus, now divide out color at the very end instead of for each sample.
Diffstat (limited to 'intern/cycles/kernel/kernel_passes.h')
-rw-r--r--intern/cycles/kernel/kernel_passes.h36
1 files changed, 12 insertions, 24 deletions
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h
index 51067630f09..d195af293b7 100644
--- a/intern/cycles/kernel/kernel_passes.h
+++ b/intern/cycles/kernel/kernel_passes.h
@@ -94,30 +94,18 @@ __device_inline void kernel_write_light_passes(KernelGlobals *kg, __global float
if(!kernel_data.film.use_light_pass)
return;
- if(flag & PASS_DIFFUSE_INDIRECT) {
- float3 color = safe_divide_color(L->indirect_diffuse, L->color_diffuse);
- kernel_write_pass_float3(buffer + kernel_data.film.pass_diffuse_indirect, sample, color);
- }
- if(flag & PASS_GLOSSY_INDIRECT) {
- float3 color = safe_divide_color(L->indirect_glossy, L->color_glossy);
- kernel_write_pass_float3(buffer + kernel_data.film.pass_glossy_indirect, sample, color);
- }
- if(flag & PASS_TRANSMISSION_INDIRECT) {
- float3 color = safe_divide_color(L->indirect_transmission, L->color_transmission);
- kernel_write_pass_float3(buffer + kernel_data.film.pass_transmission_indirect, sample, color);
- }
- if(flag & PASS_DIFFUSE_DIRECT) {
- float3 color = safe_divide_color(L->direct_diffuse, L->color_diffuse);
- kernel_write_pass_float3(buffer + kernel_data.film.pass_diffuse_direct, sample, color);
- }
- if(flag & PASS_GLOSSY_DIRECT) {
- float3 color = safe_divide_color(L->direct_glossy, L->color_glossy);
- kernel_write_pass_float3(buffer + kernel_data.film.pass_glossy_direct, sample, color);
- }
- if(flag & PASS_TRANSMISSION_DIRECT) {
- float3 color = safe_divide_color(L->direct_transmission, L->color_transmission);
- kernel_write_pass_float3(buffer + kernel_data.film.pass_transmission_direct, sample, color);
- }
+ if(flag & PASS_DIFFUSE_INDIRECT)
+ kernel_write_pass_float3(buffer + kernel_data.film.pass_diffuse_indirect, sample, L->indirect_diffuse);
+ if(flag & PASS_GLOSSY_INDIRECT)
+ kernel_write_pass_float3(buffer + kernel_data.film.pass_glossy_indirect, sample, L->indirect_glossy);
+ if(flag & PASS_TRANSMISSION_INDIRECT)
+ kernel_write_pass_float3(buffer + kernel_data.film.pass_transmission_indirect, sample, L->indirect_transmission);
+ if(flag & PASS_DIFFUSE_DIRECT)
+ kernel_write_pass_float3(buffer + kernel_data.film.pass_diffuse_direct, sample, L->direct_diffuse);
+ if(flag & PASS_GLOSSY_DIRECT)
+ kernel_write_pass_float3(buffer + kernel_data.film.pass_glossy_direct, sample, L->direct_glossy);
+ if(flag & PASS_TRANSMISSION_DIRECT)
+ kernel_write_pass_float3(buffer + kernel_data.film.pass_transmission_direct, sample, L->direct_transmission);
if(flag & PASS_EMISSION)
kernel_write_pass_float3(buffer + kernel_data.film.pass_emission, sample, L->emission);