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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-28 14:39:21 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-28 14:39:21 +0400
commit755f0183240527e9b274ce4f80f1cf1d7e414164 (patch)
treedb8472ce0ba4b4372ad1d3b907edf58c0b674164 /intern/cycles/kernel/kernel_path.h
parent1e5424564c0c01d0772641f3896ffaa1a2616e2b (diff)
Cycles: shadow pass support. Note that this only takes into account lamps,
emitting objects or world lighting do not contribute to the shadow pass. Consider this more as a pass useful for some compositing tricks, unlike other lighting passes this pass can't be used to exactly reconstruct the combined pass.
Diffstat (limited to 'intern/cycles/kernel/kernel_path.h')
-rw-r--r--intern/cycles/kernel/kernel_path.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 23860b41de3..f9eeccb1f11 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -327,6 +327,7 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
Ray light_ray;
BsdfEval L_light;
+ bool is_lamp;
#ifdef __MULTI_LIGHT__
/* index -1 means randomly sample from distribution */
@@ -336,14 +337,13 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
#else
const int i = -1;
#endif
- if(direct_emission(kg, &sd, i, light_t, light_o, light_u, light_v, &light_ray, &L_light)) {
+ if(direct_emission(kg, &sd, i, light_t, light_o, light_u, light_v, &light_ray, &L_light, &is_lamp)) {
/* trace shadow ray */
float3 shadow;
if(!shadow_blocked(kg, &state, &light_ray, &shadow)) {
/* accumulate */
- bsdf_eval_mul(&L_light, shadow);
- path_radiance_accum_light(&L, throughput, &L_light, state.bounce);
+ path_radiance_accum_light(&L, throughput, &L_light, shadow, state.bounce, is_lamp);
}
}
#ifdef __MULTI_LIGHT__