From 57e26627c485baab63e108821b2712d5e234ae7c Mon Sep 17 00:00:00 2001 From: Hristo Gueorguiev Date: Wed, 8 Mar 2017 15:42:26 +0100 Subject: Cycles: SSS and Volume rendering in split kernel Decoupled ray marching is not supported yet. Transparent shadows are always enabled for volume rendering. Changes in kernel/bvh and kernel/geom are from Sergey. This simiplifies code significantly, and prepares it for record-all transparent shadow function in split kernel. --- intern/cycles/kernel/kernel_path_volume.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'intern/cycles/kernel/kernel_path_volume.h') diff --git a/intern/cycles/kernel/kernel_path_volume.h b/intern/cycles/kernel/kernel_path_volume.h index 3d3b7385d8b..28e1b5ba98e 100644 --- a/intern/cycles/kernel/kernel_path_volume.h +++ b/intern/cycles/kernel/kernel_path_volume.h @@ -20,11 +20,11 @@ CCL_NAMESPACE_BEGIN ccl_device_inline void kernel_path_volume_connect_light( KernelGlobals *kg, - RNG *rng, + ccl_addr_space RNG *rng, ShaderData *sd, ShaderData *emission_sd, float3 throughput, - PathState *state, + ccl_addr_space PathState *state, PathRadiance *L) { #ifdef __EMISSION__ @@ -59,7 +59,7 @@ ccl_device_inline void kernel_path_volume_connect_light( } } } -#endif +#endif /* __EMISSION__ */ } #ifdef __KERNEL_GPU__ @@ -67,8 +67,14 @@ ccl_device_noinline #else ccl_device #endif -bool kernel_path_volume_bounce(KernelGlobals *kg, RNG *rng, - ShaderData *sd, float3 *throughput, PathState *state, PathRadiance *L, Ray *ray) +bool kernel_path_volume_bounce( + KernelGlobals *kg, + ccl_addr_space RNG *rng, + ShaderData *sd, + ccl_addr_space float3 *throughput, + ccl_addr_space PathState *state, + PathRadiance *L, + ccl_addr_space Ray *ray) { /* sample phase function */ float phase_pdf; @@ -111,6 +117,7 @@ bool kernel_path_volume_bounce(KernelGlobals *kg, RNG *rng, return true; } +#ifdef __BRANCHED_PATH__ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG *rng, ShaderData *sd, ShaderData *emission_sd, float3 throughput, PathState *state, PathRadiance *L, bool sample_all_lights, Ray *ray, const VolumeSegment *segment) @@ -261,10 +268,11 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG } } } -#endif +#endif /* __EMISSION__ */ } +#endif /* __BRANCHED_PATH__ */ -#endif +#endif /* __VOLUME_SCATTER__ */ CCL_NAMESPACE_END -- cgit v1.2.3