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/render')
-rw-r--r--intern/cycles/render/film.cpp4
-rw-r--r--intern/cycles/render/integrator.cpp13
-rw-r--r--intern/cycles/render/integrator.h3
-rw-r--r--intern/cycles/render/scene.cpp1
4 files changed, 21 insertions, 0 deletions
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp
index 1f7882ea91e..bd18c777eb5 100644
--- a/intern/cycles/render/film.cpp
+++ b/intern/cycles/render/film.cpp
@@ -680,6 +680,10 @@ uint Film::get_kernel_features(const Scene *scene) const
kernel_features |= KERNEL_FEATURE_SHADOW_PASS;
}
}
+
+ if (pass_type == PASS_AO) {
+ kernel_features |= KERNEL_FEATURE_AO_PASS;
+ }
}
return kernel_features;
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index d74d14242bb..16d9fc60fd3 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -55,6 +55,7 @@ NODE_DEFINE(Integrator)
SOCKET_INT(ao_bounces, "AO Bounces", 0);
SOCKET_FLOAT(ao_factor, "AO Factor", 0.0f);
SOCKET_FLOAT(ao_distance, "AO Distance", FLT_MAX);
+ SOCKET_FLOAT(ao_additive_factor, "AO Additive Factor", 0.0f);
SOCKET_INT(volume_max_steps, "Volume Max Steps", 1024);
SOCKET_FLOAT(volume_step_rate, "Volume Step Rate", 1.0f);
@@ -159,6 +160,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
kintegrator->ao_bounces = ao_bounces;
kintegrator->ao_bounces_distance = ao_distance;
kintegrator->ao_bounces_factor = ao_factor;
+ kintegrator->ao_additive_factor = ao_additive_factor;
/* Transparent Shadows
* We only need to enable transparent shadows, if we actually have
@@ -268,6 +270,17 @@ void Integrator::tag_update(Scene *scene, uint32_t flag)
}
}
+uint Integrator::get_kernel_features(const Scene *scene) const
+{
+ uint kernel_features = 0;
+
+ if (ao_additive_factor != 0.0f) {
+ kernel_features |= KERNEL_FEATURE_AO_ADDITIVE;
+ }
+
+ return kernel_features;
+}
+
AdaptiveSampling Integrator::get_adaptive_sampling() const
{
AdaptiveSampling adaptive_sampling;
diff --git a/intern/cycles/render/integrator.h b/intern/cycles/render/integrator.h
index 5ad419e02ca..91efc25e51e 100644
--- a/intern/cycles/render/integrator.h
+++ b/intern/cycles/render/integrator.h
@@ -47,6 +47,7 @@ class Integrator : public Node {
NODE_SOCKET_API(int, ao_bounces)
NODE_SOCKET_API(float, ao_factor)
NODE_SOCKET_API(float, ao_distance)
+ NODE_SOCKET_API(float, ao_additive_factor)
NODE_SOCKET_API(int, volume_max_steps)
NODE_SOCKET_API(float, volume_step_rate)
@@ -101,6 +102,8 @@ class Integrator : public Node {
void tag_update(Scene *scene, uint32_t flag);
+ uint get_kernel_features(const Scene *scene) const;
+
AdaptiveSampling get_adaptive_sampling() const;
DenoiseParams get_denoise_params() const;
};
diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp
index 7c5e1a86f5e..669f5abf7d6 100644
--- a/intern/cycles/render/scene.cpp
+++ b/intern/cycles/render/scene.cpp
@@ -522,6 +522,7 @@ void Scene::update_kernel_features()
}
kernel_features |= film->get_kernel_features(this);
+ kernel_features |= integrator->get_kernel_features(this);
dscene.data.kernel_features = kernel_features;