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@gmail.com>2018-08-20 17:09:17 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-20 17:09:17 +0300
commit7ffcce860729e043f41022357ac5703c899cf4db (patch)
tree61ea66440b4ee561fd541b96f43c58b9d59512a0
parentf52e31a46dc16275a31cb36d85d09fdf1a675a65 (diff)
Fix Cycles AO pass not working for shadow catcher objects.
-rw-r--r--intern/cycles/kernel/kernel_accumulate.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h
index 6b3cec9fda6..86ad6e1a061 100644
--- a/intern/cycles/kernel/kernel_accumulate.h
+++ b/intern/cycles/kernel/kernel_accumulate.h
@@ -320,7 +320,13 @@ ccl_device_inline void path_radiance_accum_ao(PathRadiance *L,
float3 bsdf,
float3 ao)
{
+ /* Store AO pass. */
+ if(L->use_light_pass && state->bounce == 0) {
+ L->ao += alpha*throughput*ao;
+ }
+
#ifdef __SHADOW_TRICKS__
+ /* For shadow catcher, accumulate ratio. */
if(state->flag & PATH_RAY_STORE_SHADOW_INFO) {
float3 light = throughput * bsdf;
L->path_total += light;
@@ -335,12 +341,11 @@ ccl_device_inline void path_radiance_accum_ao(PathRadiance *L,
#ifdef __PASSES__
if(L->use_light_pass) {
if(state->bounce == 0) {
- /* directly visible lighting */
+ /* Directly visible lighting. */
L->direct_diffuse += throughput*bsdf*ao;
- L->ao += alpha*throughput*ao;
}
else {
- /* indirectly visible lighting after BSDF bounce */
+ /* Indirectly visible lighting after BSDF bounce. */
L->indirect += throughput*bsdf*ao;
}
}