diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-06-24 13:34:42 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-06-24 13:35:48 +0400 |
commit | 4b209f063cf384f05a9a02d4ac64e90c0ba14e73 (patch) | |
tree | e474f413248a1725562d9b3a81f356ba858f31a5 /intern/cycles/kernel/kernel_path.h | |
parent | 16baa8c273e0c344dcf985205e43957591cf5ad6 (diff) |
Fix T40695: world surface shader incorrectly visible with world volume.
Diffstat (limited to 'intern/cycles/kernel/kernel_path.h')
-rw-r--r-- | intern/cycles/kernel/kernel_path.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index d9ad348a952..83bceed44e5 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -132,6 +132,9 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, Ray ray, scatter = kernel_path_volume_bounce(kg, rng, &volume_sd, &throughput, &state, L, &ray, 1.0f); } + if(result != VOLUME_PATH_SCATTERED) + throughput *= volume_segment.accum_transmittance; + /* free cached steps */ kernel_volume_decoupled_free(kg, &volume_segment); @@ -514,6 +517,9 @@ ccl_device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, scatter = kernel_path_volume_bounce(kg, rng, &volume_sd, &throughput, &state, &L, &ray, 1.0f); } + if(result != VOLUME_PATH_SCATTERED) + throughput *= volume_segment.accum_transmittance; + /* free cached steps */ kernel_volume_decoupled_free(kg, &volume_segment); |