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:
Diffstat (limited to 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r--intern/cycles/blender/blender_shader.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 5310e35dc25..a88bcaf3ace 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -696,6 +696,20 @@ void BlenderSync::sync_world()
graph->connect(closure->output("Background"), out->input("Surface"));
}
+ /* AO */
+ if(b_world) {
+ BL::WorldLighting b_light = b_world.light_settings();
+
+ if(b_light.use_ambient_occlusion()) {
+ background->ao_factor = b_light.ao_factor();
+ background->ao_distance = b_light.distance();
+ }
+ else {
+ background->ao_factor = 0.0f;
+ background->ao_distance = 0.0f;
+ }
+ }
+
shader->set_graph(graph);
shader->tag_update(scene);
}