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:
authorDalai Felinto <dfelinto@gmail.com>2014-05-23 02:05:23 +0400
committerDalai Felinto <dfelinto@gmail.com>2014-05-23 02:05:23 +0400
commitd7e4a793880796e7236f73df3f35abb045941aad (patch)
tree190c54d274a35946864e752a0363a94d5430b479 /intern/cycles/kernel/kernel_bake.h
parent2bfc3debd90ac0176e62de37d7aeea1a5316e658 (diff)
Cycles-Bake: fix T40270 Combined Type fails to bake Emission node
Main code and review by Brecht Van Lommel Differential Revision: https://developer.blender.org/D543
Diffstat (limited to 'intern/cycles/kernel/kernel_bake.h')
-rw-r--r--intern/cycles/kernel/kernel_bake.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h
index abe356996ab..b64c5cecbff 100644
--- a/intern/cycles/kernel/kernel_bake.h
+++ b/intern/cycles/kernel/kernel_bake.h
@@ -66,6 +66,12 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
/* sample light and BSDF */
if((!is_sss) && (!is_ao)) {
+
+ if(sd->flag & SD_EMISSION) {
+ float3 emission = indirect_primitive_emission(kg, sd, 0.0f, state.flag, state.ray_pdf);
+ path_radiance_accum_emission(&L_sample, throughput, emission, state.bounce);
+ }
+
if(kernel_path_integrate_lighting(kg, &rng, sd, &throughput, &state, &L_sample, &ray)) {
#ifdef __LAMP_MIS__
state.ray_t = 0.0f;
@@ -98,6 +104,12 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
/* sample light and BSDF */
if((!is_sss) && (!is_ao)) {
+
+ if(sd->flag & SD_EMISSION) {
+ float3 emission = indirect_primitive_emission(kg, sd, 0.0f, state.flag, state.ray_pdf);
+ path_radiance_accum_emission(&L_sample, throughput, emission, state.bounce);
+ }
+
kernel_branched_path_integrate_lighting(kg, &rng,
sd, throughput, 1.0f, &state, &L_sample);
}