diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-21 10:05:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-21 10:05:40 +0300 |
commit | 797274d25666d6442648ae3e206364773d72b133 (patch) | |
tree | 6b9c92b368b53c1e0439ad09fad3247a5d2ddc5c /intern | |
parent | f189ad1f4b3602e1764994c78c4d906dc12dcc8f (diff) | |
parent | 0734541bc43005609a390ab2e32020ae175d328a (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_accumulate.h | 11 |
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; } } |