diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-09-13 13:43:57 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-09-17 12:24:55 +0300 |
commit | 271c6794d6295e0022a4088cd0bf6b0592b7abf2 (patch) | |
tree | 0353adc33f358d21eea09eeefc13c52f312c714b /intern/cycles/kernel/kernel_passes.h | |
parent | 11b0c2080cc19d4f0f35be8eb8845f6ce44243cb (diff) |
Cycles: Viewport Rendering Memory Improvement
Small memory reduction change by only storing the pixels of the combined
pass when it is being shown in the viewport. Previously the combined pass
was always calculated and present in the output buffer. The combined pass
will still be calculated.
It is a limitation in Blender that Cycles always had a combined pass.
This patch will remove the limitation from the code base of Cycles.
Blender still has the limitation, but will always request the combined
renderpass when doing final rendering.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5784
Diffstat (limited to 'intern/cycles/kernel/kernel_passes.h')
-rw-r--r-- | intern/cycles/kernel/kernel_passes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h index 4a424866efe..c1d74dddc2a 100644 --- a/intern/cycles/kernel/kernel_passes.h +++ b/intern/cycles/kernel/kernel_passes.h @@ -397,7 +397,9 @@ ccl_device_inline void kernel_write_result(KernelGlobals *kg, float alpha; float3 L_sum = path_radiance_clamp_and_sum(kg, L, &alpha); - kernel_write_pass_float4(buffer, make_float4(L_sum.x, L_sum.y, L_sum.z, alpha)); + if (kernel_data.film.pass_flag & PASSMASK(COMBINED)) { + kernel_write_pass_float4(buffer, make_float4(L_sum.x, L_sum.y, L_sum.z, alpha)); + } kernel_write_light_passes(kg, buffer, L); |