diff options
author | Thomas Dinges <blender@dingto.org> | 2014-08-20 23:53:52 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2014-08-21 00:59:08 +0400 |
commit | 075f6eff746b9fc6b1eabfccb213f02decd62fe8 (patch) | |
tree | 996fee3ad9af8718cb62f00eab7ff7d370b93d74 /intern/cycles/kernel/kernel_path_volume.h | |
parent | c3e59379c08558272d0fa8a9e88c6f2e81ded28d (diff) |
Cycles: Further tweak for Decoupled Ray Marching
Avoid some if checks when probalistic_scatter is false.
Differential Revision: https://developer.blender.org/D743
Diffstat (limited to 'intern/cycles/kernel/kernel_path_volume.h')
-rw-r--r-- | intern/cycles/kernel/kernel_path_volume.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/intern/cycles/kernel/kernel_path_volume.h b/intern/cycles/kernel/kernel_path_volume.h index 5e47a3ea6ac..e7047f0ab85 100644 --- a/intern/cycles/kernel/kernel_path_volume.h +++ b/intern/cycles/kernel/kernel_path_volume.h @@ -144,9 +144,8 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG VolumeIntegrateResult result = kernel_volume_decoupled_scatter(kg, state, ray, sd, &tp, rphase, rscatter, segment, (ls.t != FLT_MAX)? &ls.P: NULL, false); - - if(result != VOLUME_PATH_SCATTERED) - continue; + + kernel_assert(result == VOLUME_PATH_SCATTERED); /* todo: split up light_sample so we don't have to call it again with new position */ lamp_light_sample(kg, i, light_u, light_v, sd->P, &ls); @@ -195,9 +194,8 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG VolumeIntegrateResult result = kernel_volume_decoupled_scatter(kg, state, ray, sd, &tp, rphase, rscatter, segment, (ls.t != FLT_MAX)? &ls.P: NULL, false); - - if(result != VOLUME_PATH_SCATTERED) - continue; + + kernel_assert(result == VOLUME_PATH_SCATTERED); /* todo: split up light_sample so we don't have to call it again with new position */ light_sample(kg, light_t, light_u, light_v, sd->time, sd->P, &ls); @@ -234,9 +232,8 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG VolumeIntegrateResult result = kernel_volume_decoupled_scatter(kg, state, ray, sd, &tp, rphase, rscatter, segment, (ls.t != FLT_MAX)? &ls.P: NULL, false); - - if(result != VOLUME_PATH_SCATTERED) - return; + + kernel_assert(result == VOLUME_PATH_SCATTERED); /* todo: split up light_sample so we don't have to call it again with new position */ light_sample(kg, light_t, light_u, light_v, sd->time, sd->P, &ls); |