[Bf-blender-cvs] [6193e818102] cycles-x: Fix adaptive sampling with denoising in Cycles X
Sergey Sharybin
noreply at git.blender.org
Thu Jul 8 17:48:27 CEST 2021
Commit: 6193e8181025c32007a499eee419aae96f3c1c7b
Author: Sergey Sharybin
Date: Thu Jul 8 17:46:24 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB6193e8181025c32007a499eee419aae96f3c1c7b
Fix adaptive sampling with denoising in Cycles X
Writing to the combined pass can not assume that the combined pass has
offset of 0: it is possible that pass at 0 offset is a denoised pass.
Use explicit offset, similar to other places where accumulation to the
combined pass happens.
===================================================================
M intern/cycles/kernel/kernel_accumulate.h
M intern/cycles/kernel/kernel_adaptive_sampling.h
===================================================================
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h
index 2940b162eb0..f5850ec9258 100644
--- a/intern/cycles/kernel/kernel_accumulate.h
+++ b/intern/cycles/kernel/kernel_accumulate.h
@@ -633,7 +633,7 @@ ccl_device_inline void kernel_accum_transparent(INTEGRATOR_STATE_CONST_ARGS,
if (kernel_data.film.light_pass_flag & PASSMASK(COMBINED)) {
ccl_global float *buffer = kernel_accum_pixel_render_buffer(INTEGRATOR_STATE_PASS,
render_buffer);
- kernel_write_pass_float(buffer + 3, transparent);
+ kernel_write_pass_float(buffer + kernel_data.film.pass_combined + 3, transparent);
}
}
diff --git a/intern/cycles/kernel/kernel_adaptive_sampling.h b/intern/cycles/kernel/kernel_adaptive_sampling.h
index 61ae0c60cb0..8471058e178 100644
--- a/intern/cycles/kernel/kernel_adaptive_sampling.h
+++ b/intern/cycles/kernel/kernel_adaptive_sampling.h
@@ -66,7 +66,7 @@ ccl_device bool kernel_adaptive_sampling_convergence_check(const KernelGlobals *
return true;
}
- const float4 I = *((ccl_global float4 *)buffer);
+ const float4 I = *(ccl_global float4 *)(buffer + kernel_data.film.pass_combined);
const float sample = __float_as_uint(buffer[kernel_data.film.pass_sample_count]);
More information about the Bf-blender-cvs
mailing list