diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-30 16:40:37 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-02-08 16:00:48 +0300 |
commit | b16fd220184a9172073440ed35e0eae0a15635d0 (patch) | |
tree | 0a1e1721b68be520b6b0380be911d2228174a431 /intern | |
parent | da31a8283228eef0e83d4aa76d71ff57527cbab6 (diff) |
Cycles: Fix regression with transparent shadows in volume
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_shadow.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_shadow.h b/intern/cycles/kernel/kernel_shadow.h index 73c5dbd1d2a..06a77a208cb 100644 --- a/intern/cycles/kernel/kernel_shadow.h +++ b/intern/cycles/kernel/kernel_shadow.h @@ -23,16 +23,23 @@ ccl_device_forceinline bool shadow_handle_transparent_isect( KernelGlobals *kg, ShaderData *shadow_sd, ccl_addr_space PathState *state, +# ifdef __VOLUME__ + struct PathState *volume_state, +# endif Intersection *isect, Ray *ray, float3 *throughput) { #ifdef __VOLUME__ /* Attenuation between last surface and next surface. */ - if(state->volume_stack[0].shader != SHADER_NONE) { + if(volume_state->volume_stack[0].shader != SHADER_NONE) { Ray segment_ray = *ray; segment_ray.t = isect->t; - kernel_volume_shadow(kg, shadow_sd, state, &segment_ray, throughput); + kernel_volume_shadow(kg, + shadow_sd, + volume_state, + &segment_ray, + throughput); } #endif /* Setup shader data at surface. */ @@ -56,7 +63,7 @@ ccl_device_forceinline bool shadow_handle_transparent_isect( } #ifdef __VOLUME__ /* Exit/enter volume. */ - kernel_volume_stack_enter_exit(kg, shadow_sd, state->volume_stack); + kernel_volume_stack_enter_exit(kg, shadow_sd, volume_state->volume_stack); #endif return false; } @@ -163,6 +170,9 @@ ccl_device bool shadow_blocked_transparent_all_loop(KernelGlobals *kg, if(shadow_handle_transparent_isect(kg, shadow_sd, state, +#ifdef __VOLUME__ + &ps, +#endif isect, ray, &throughput)) @@ -288,6 +298,9 @@ ccl_device bool shadow_blocked_transparent_stepped_loop( if(shadow_handle_transparent_isect(kg, shadow_sd, state, +#ifdef __VOLUME__ + &ps, +#endif isect, ray, &throughput)) |