From 171c4e982f7b6c93b534a48cfe8aba73dec78030 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 25 Oct 2017 21:07:44 +0200 Subject: 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. --- intern/cycles/kernel/kernel_path.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'intern/cycles/kernel/kernel_path.h') 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); -- cgit v1.2.3