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.
This commit is contained in:
Brecht Van Lommel
2017-10-25 21:07:44 +02:00
parent 8988f383c1
commit 171c4e982f
5 changed files with 16 additions and 15 deletions

View File

@@ -74,14 +74,9 @@ void Background::device_update(Device *device, DeviceScene *dscene, Scene *scene
/* set shader index and transparent option */
KernelBackground *kbackground = &dscene->data.background;
if(use_ao) {
kbackground->ao_factor = ao_factor;
kbackground->ao_distance = ao_distance;
}
else {
kbackground->ao_factor = 0.0f;
kbackground->ao_distance = FLT_MAX;
}
kbackground->ao_factor = (use_ao)? ao_factor: 0.0f;
kbackground->ao_bounces_factor = ao_factor;
kbackground->ao_distance = ao_distance;
kbackground->transparent = transparent;
kbackground->surface_shader = scene->shader_manager->get_shader_id(bg_shader);