diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-03-28 14:39:21 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-03-28 14:39:21 +0400 |
commit | 755f0183240527e9b274ce4f80f1cf1d7e414164 (patch) | |
tree | db8472ce0ba4b4372ad1d3b907edf58c0b674164 /intern/cycles/kernel/kernel_emission.h | |
parent | 1e5424564c0c01d0772641f3896ffaa1a2616e2b (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_emission.h')
-rw-r--r-- | intern/cycles/kernel/kernel_emission.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h index 2243858a403..764ac599991 100644 --- a/intern/cycles/kernel/kernel_emission.h +++ b/intern/cycles/kernel/kernel_emission.h @@ -60,7 +60,8 @@ __device float3 direct_emissive_eval(KernelGlobals *kg, float rando, } __device bool direct_emission(KernelGlobals *kg, ShaderData *sd, int lindex, - float randt, float rando, float randu, float randv, Ray *ray, BsdfEval *eval) + float randt, float rando, float randu, float randv, Ray *ray, BsdfEval *eval, + bool *is_lamp) { LightSample ls; @@ -135,6 +136,8 @@ __device bool direct_emission(KernelGlobals *kg, ShaderData *sd, int lindex, ray->t = 0.0f; } + *is_lamp = (ls.prim == ~0); + return true; } |