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
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2014-07-13 14:06:31 +0400
committerThomas Dinges <blender@dingto.org>2014-07-13 14:06:54 +0400
commite35845d37cd9ff9ab287eb8250476de687cca832 (patch)
tree684b2cb958c3b90772518d2a9732b6a153819e6c /intern/cycles/kernel/kernel_path_volume.h
parentcfbc495b8ddbbda16708cbbb5159689d0ef143ab (diff)
Fix T40987: Distant Lamps have no influence on Volumes.
Differential Revision: https://developer.blender.org/D639
Diffstat (limited to 'intern/cycles/kernel/kernel_path_volume.h')
-rw-r--r--intern/cycles/kernel/kernel_path_volume.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/intern/cycles/kernel/kernel_path_volume.h b/intern/cycles/kernel/kernel_path_volume.h
index 8453b79de45..b4917f9a3ae 100644
--- a/intern/cycles/kernel/kernel_path_volume.h
+++ b/intern/cycles/kernel/kernel_path_volume.h
@@ -41,9 +41,8 @@ ccl_device void kernel_path_volume_connect_light(KernelGlobals *kg, RNG *rng,
light_ray.time = sd->time;
#endif
- if(!light_sample(kg, light_t, light_u, light_v, sd->time, sd->P, &ls, true))
- return;
- else if(ls.pdf == 0.0f)
+ light_sample(kg, light_t, light_u, light_v, sd->time, sd->P, &ls);
+ if(ls.pdf == 0.0f)
return;
if(direct_emission(kg, sd, &ls, &light_ray, &L_light, &is_lamp, state->bounce, state->transparent_bounce)) {
@@ -135,8 +134,7 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG
path_branched_rng_2D(kg, &lamp_rng, state, j, num_samples, PRNG_LIGHT_U, &light_u, &light_v);
LightSample ls;
- if(!light_select(kg, i, light_u, light_v, ray->P, &ls, true))
- continue;
+ light_select(kg, i, light_u, light_v, ray->P, &ls);
float3 tp = throughput;
@@ -152,8 +150,7 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG
continue;
/* todo: split up light_sample so we don't have to call it again with new position */
- if(!light_select(kg, i, light_u, light_v, sd->P, &ls, true))
- continue;
+ light_select(kg, i, light_u, light_v, sd->P, &ls);
}
if(ls.pdf == 0.0f)
@@ -190,8 +187,7 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG
light_t = 0.5f*light_t;
LightSample ls;
- if(!light_sample(kg, light_t, light_u, light_v, sd->time, ray->P, &ls, true))
- continue;
+ light_sample(kg, light_t, light_u, light_v, sd->time, ray->P, &ls);
float3 tp = throughput;
@@ -207,8 +203,7 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG
continue;
/* todo: split up light_sample so we don't have to call it again with new position */
- if(!light_sample(kg, light_t, light_u, light_v, sd->time, sd->P, &ls, true))
- continue;
+ light_sample(kg, light_t, light_u, light_v, sd->time, sd->P, &ls);
}
if(ls.pdf == 0.0f)
@@ -233,8 +228,7 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG
path_state_rng_2D(kg, rng, state, PRNG_LIGHT_U, &light_u, &light_v);
LightSample ls;
- if(!light_sample(kg, light_t, light_u, light_v, sd->time, ray->P, &ls, true))
- return;
+ light_sample(kg, light_t, light_u, light_v, sd->time, ray->P, &ls);
float3 tp = throughput;
@@ -250,8 +244,7 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg, RNG
return;
/* todo: split up light_sample so we don't have to call it again with new position */
- if(!light_sample(kg, light_t, light_u, light_v, sd->time, sd->P, &ls, true))
- return;
+ light_sample(kg, light_t, light_u, light_v, sd->time, sd->P, &ls);
}
if(ls.pdf == 0.0f)