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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-31 18:57:46 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-31 18:57:46 +0400
commit87149fc4b6b700ddaa2778b935b7a7908a9d6b1d (patch)
treefff5f3c93577d74ba44c40ea2b0a95e43301ae17 /intern
parentf07f59c760eeb2466f9f1bc74c6b4d6ba4b348d3 (diff)
Fix #30034: bug in multiple importance sampling + transparency, would
give slightly wrong lighting behind transparent objects.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_path.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 1a42cf1ed7e..05ee3212b4c 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -220,9 +220,7 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
path_radiance_init(&L, kernel_data.film.use_light_pass);
-#if defined(__EMISSION__) || defined(__BACKGROUND__)
float ray_pdf = 0.0f;
-#endif
PathState state;
int rng_offset = PRNG_BASE_NUM;
@@ -344,9 +342,8 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
path_radiance_bsdf_bounce(&L, &throughput, &bsdf_eval, bsdf_pdf, state.bounce, label);
/* set labels */
-#if defined(__EMISSION__) || defined(__BACKGROUND__)
- ray_pdf = bsdf_pdf;
-#endif
+ if(!(label & LABEL_TRANSPARENT))
+ ray_pdf = bsdf_pdf;
/* update path state */
path_state_next(kg, &state, label);