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:
Diffstat (limited to 'intern/cycles/kernel/integrator/shade_background.h')
-rw-r--r--intern/cycles/kernel/integrator/shade_background.h20
1 files changed, 4 insertions, 16 deletions
diff --git a/intern/cycles/kernel/integrator/shade_background.h b/intern/cycles/kernel/integrator/shade_background.h
index 71a590749bd..24482e85b05 100644
--- a/intern/cycles/kernel/integrator/shade_background.h
+++ b/intern/cycles/kernel/integrator/shade_background.h
@@ -192,23 +192,11 @@ ccl_device void integrator_shade_background(KernelGlobals kg,
#ifdef __SHADOW_CATCHER__
if (INTEGRATOR_STATE(state, path, flag) & PATH_RAY_SHADOW_CATCHER_BACKGROUND) {
+ /* Special case for shadow catcher where we want to fill the background pass
+ * behind the shadow catcher but also continue tracing the path. */
INTEGRATOR_STATE_WRITE(state, path, flag) &= ~PATH_RAY_SHADOW_CATCHER_BACKGROUND;
-
- const int isect_prim = INTEGRATOR_STATE(state, isect, prim);
- const int isect_type = INTEGRATOR_STATE(state, isect, type);
- const int shader = intersection_get_shader_from_isect_prim(kg, isect_prim, isect_type);
- const int shader_flags = kernel_tex_fetch(__shaders, shader).flags;
-
- if (shader_flags & SD_HAS_RAYTRACE) {
- INTEGRATOR_PATH_NEXT_SORTED(DEVICE_KERNEL_INTEGRATOR_SHADE_BACKGROUND,
- DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE,
- shader);
- }
- else {
- INTEGRATOR_PATH_NEXT_SORTED(DEVICE_KERNEL_INTEGRATOR_SHADE_BACKGROUND,
- DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE,
- shader);
- }
+ integrator_intersect_next_kernel_after_shadow_catcher_background<
+ DEVICE_KERNEL_INTEGRATOR_SHADE_BACKGROUND>(kg, state);
return;
}
#endif