[Bf-blender-cvs] [1261f8eaa7d] split-kernel-faster-building: Cycles: Fix issue with AO in split kernel_path_background
Mai Lavelle
noreply at git.blender.org
Tue Nov 28 11:49:55 CET 2017
Commit: 1261f8eaa7d60554d8678ca2256f123951ed509d
Author: Mai Lavelle
Date: Tue Nov 28 05:46:50 2017 -0500
Branches: split-kernel-faster-building
https://developer.blender.org/rB1261f8eaa7d60554d8678ca2256f123951ed509d
Cycles: Fix issue with AO in split kernel_path_background
Watch out for changes to variables passed by value, these changes
don't persist across the split.
===================================================================
M intern/cycles/kernel/kernel_path.h
===================================================================
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index a2547ceddd6..c43cdedac3b 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -190,12 +190,6 @@ ccl_device_forceinline bool kernel_path_background_setup(
return false;
}
- /* 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 */
return indirect_background_setup(kg, sd, state, ray);
@@ -215,6 +209,13 @@ ccl_device_forceinline void kernel_path_background_finish(
#ifdef __BACKGROUND__
/* sample background shader */
float3 L_background = indirect_background_finish(kg, sd, state, ray);
+
+ /* 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;
+ }
+
path_radiance_accum_background(L, state, throughput, L_background);
#endif /* __BACKGROUND__ */
}
More information about the Bf-blender-cvs
mailing list