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
path: root/intern
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2014-07-07 15:27:50 +0400
committerThomas Dinges <blender@dingto.org>2014-07-07 15:28:10 +0400
commitef22e972b1ad0bed1a79587b72d50c7da4c6b4e8 (patch)
tree0b76c936bd070b8d5b9e4418fb00dc04af2d9882 /intern
parenta472a544d339d5d131aaed9cf92ab513e1edcff4 (diff)
Code cleanup: Simplify decoupled scattering code a bit.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_path.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index d7fbec24bef..0b7d5acd772 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -109,7 +109,6 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, Ray ray,
/* scattering */
VolumeIntegrateResult result = VOLUME_PATH_ATTENUATED;
- bool scatter = false;
if(volume_segment.closure_flag & SD_SCATTER) {
bool all = kernel_data.integrator.sample_all_lights_indirect;
@@ -127,9 +126,6 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, Ray ray,
result = kernel_volume_decoupled_scatter(kg,
&state, &volume_ray, &volume_sd, &throughput,
rphase, rscatter, &volume_segment, NULL, true);
-
- if(result == VOLUME_PATH_SCATTERED)
- scatter = kernel_path_volume_bounce(kg, rng, &volume_sd, &throughput, &state, L, &ray, 1.0f);
}
if(result != VOLUME_PATH_SCATTERED)
@@ -139,7 +135,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, Ray ray,
kernel_volume_decoupled_free(kg, &volume_segment);
if(result == VOLUME_PATH_SCATTERED) {
- if(scatter)
+ if(kernel_path_volume_bounce(kg, rng, &volume_sd, &throughput, &state, L, &ray, 1.0f))
continue;
else
break;
@@ -494,7 +490,6 @@ ccl_device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample,
/* scattering */
VolumeIntegrateResult result = VOLUME_PATH_ATTENUATED;
- bool scatter = false;
if(volume_segment.closure_flag & SD_SCATTER) {
bool all = false;
@@ -512,9 +507,6 @@ ccl_device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample,
result = kernel_volume_decoupled_scatter(kg,
&state, &volume_ray, &volume_sd, &throughput,
rphase, rscatter, &volume_segment, NULL, true);
-
- if(result == VOLUME_PATH_SCATTERED)
- scatter = kernel_path_volume_bounce(kg, rng, &volume_sd, &throughput, &state, &L, &ray, 1.0f);
}
if(result != VOLUME_PATH_SCATTERED)
@@ -524,7 +516,7 @@ ccl_device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample,
kernel_volume_decoupled_free(kg, &volume_segment);
if(result == VOLUME_PATH_SCATTERED) {
- if(scatter)
+ if(kernel_path_volume_bounce(kg, rng, &volume_sd, &throughput, &state, &L, &ray, 1.0f))
continue;
else
break;