diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-10-25 22:07:44 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-10-25 22:46:23 +0300 |
commit | 171c4e982f7b6c93b534a48cfe8aba73dec78030 (patch) | |
tree | 5be791cde024a371a3131880b4ba4ceee55e4604 /intern/cycles/kernel/kernel_path.h | |
parent | 8988f383c1fb690bde976cc6de4438b327186203 (diff) |
Cycles: use AO factor to let user adjust intensity of AO bounces.
We are already using the AO distance, so might as well offer this extra
control over the intensity. Useful when an interior scene is supposed to
be significantly darker than the background shader.
Diffstat (limited to 'intern/cycles/kernel/kernel_path.h')
-rw-r--r-- | intern/cycles/kernel/kernel_path.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index 652777a77a0..e664a2e9dbd 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -145,6 +145,12 @@ ccl_device_forceinline void kernel_path_background( return; } + /* When using the ao bounces approximation, adjust background + * shader intensity with ao factor. */ + if(path_state_ao_bounce(kg, state)) { + throughput *= kernel_data.background.ao_bounces_factor; + } + #ifdef __BACKGROUND__ /* sample background shader */ float3 L_background = indirect_background(kg, emission_sd, state, ray); |