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:
authorSergey Sharybin <sergey@blender.org>2021-10-13 16:55:54 +0300
committerSergey Sharybin <sergey@blender.org>2021-10-14 10:39:38 +0300
commitaa46459543e7ff26ad5d2ba7801ad0a0a0bc99fc (patch)
tree47128d479c57df3fb4f5cee5f62f30879eeef3e9 /intern/cycles/integrator
parent4f5ef3b01817ec8b73dca9e6fa1672fbe09167e4 (diff)
Fix shadow catcher behind transparent object on GPU
The assumption about absent shadow path was wrong. The rest of the changes are to ensure shadow paths are finished prior to the split, so that they write to the proper passes. The issue was caught by running regression tests on OptiX. Differential Revision: https://developer.blender.org/D12857
Diffstat (limited to 'intern/cycles/integrator')
-rw-r--r--intern/cycles/integrator/path_trace_work_gpu.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/intern/cycles/integrator/path_trace_work_gpu.cpp b/intern/cycles/integrator/path_trace_work_gpu.cpp
index df393bac0de..02830a00405 100644
--- a/intern/cycles/integrator/path_trace_work_gpu.cpp
+++ b/intern/cycles/integrator/path_trace_work_gpu.cpp
@@ -342,10 +342,14 @@ bool PathTraceWorkGPU::enqueue_path_iteration()
}
/* Finish shadows before potentially adding more shadow rays. We can only
- * store one shadow ray in the integrator state. */
+ * store one shadow ray in the integrator state.
+ *
+ * When there is a shadow catcher in the scene finish shadow rays before invoking interesect
+ * closest kernel since so that the shadow paths are writing to the pre-split state. */
if (kernel == DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE ||
kernel == DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE ||
- kernel == DEVICE_KERNEL_INTEGRATOR_SHADE_VOLUME) {
+ kernel == DEVICE_KERNEL_INTEGRATOR_SHADE_VOLUME ||
+ (has_shadow_catcher() && kernel == DEVICE_KERNEL_INTEGRATOR_INTERSECT_CLOSEST)) {
if (queue_counter->num_queued[DEVICE_KERNEL_INTEGRATOR_INTERSECT_SHADOW]) {
enqueue_path_iteration(DEVICE_KERNEL_INTEGRATOR_INTERSECT_SHADOW);
return true;