Cycles: Fixed Shadow and Mist passes with adaptive sampling.
This also fixes a side-effect where turning on UV pass but leaving Shadow pass turned off destroyed the Combined pass.
This commit is contained in:
@@ -54,12 +54,6 @@ ccl_device void kernel_adaptive_post_adjust(KernelGlobals *kg,
|
||||
#ifdef __PASSES__
|
||||
int flag = kernel_data.film.pass_flag;
|
||||
|
||||
if (flag & PASSMASK(SHADOW))
|
||||
*(ccl_global float3 *)(buffer + kernel_data.film.pass_shadow) *= sample_multiplier;
|
||||
|
||||
if (flag & PASSMASK(MIST))
|
||||
*(ccl_global float *)(buffer + kernel_data.film.pass_mist) *= sample_multiplier;
|
||||
|
||||
if (flag & PASSMASK(NORMAL))
|
||||
*(ccl_global float3 *)(buffer + kernel_data.film.pass_normal) *= sample_multiplier;
|
||||
|
||||
@@ -74,6 +68,11 @@ ccl_device void kernel_adaptive_post_adjust(KernelGlobals *kg,
|
||||
if (kernel_data.film.use_light_pass) {
|
||||
int light_flag = kernel_data.film.light_pass_flag;
|
||||
|
||||
if (light_flag & PASSMASK(MIST))
|
||||
*(ccl_global float *)(buffer + kernel_data.film.pass_mist) *= sample_multiplier;
|
||||
|
||||
/* Shadow pass omitted on purpose. It has its own scale parameter. */
|
||||
|
||||
if (light_flag & PASSMASK(DIFFUSE_INDIRECT))
|
||||
*(ccl_global float3 *)(buffer + kernel_data.film.pass_diffuse_indirect) *= sample_multiplier;
|
||||
if (light_flag & PASSMASK(GLOSSY_INDIRECT))
|
||||
|
||||
Reference in New Issue
Block a user