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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-06-28 18:06:32 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-06-28 18:47:53 +0300
commitc9238e638fd5f6b3e4cf22d879d397dee1b09b48 (patch)
treec03058522ffe94482870ad084bd76ec43823222e /intern/cycles/render
parent4e8c5f4bc8c77d70328797ea179bb1c7ca0e51e2 (diff)
Cycles: add back control to render first N bounces with path termination
It's found in the Sampling > Advanced panel and 0 by default. This helps to reduce noise in some scenes, while making others slower.
Diffstat (limited to 'intern/cycles/render')
-rw-r--r--intern/cycles/render/integrator.cpp4
-rw-r--r--intern/cycles/render/integrator.h2
-rw-r--r--intern/cycles/render/nodes.cpp4
3 files changed, 8 insertions, 2 deletions
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index d3873dcfe46..76258a292e8 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -32,6 +32,7 @@ NODE_DEFINE(Integrator)
{
NodeType *type = NodeType::add("integrator", create);
+ SOCKET_INT(min_bounce, "Min Bounce", 0);
SOCKET_INT(max_bounce, "Max Bounce", 7);
SOCKET_INT(max_diffuse_bounce, "Max Diffuse Bounce", 7);
@@ -39,6 +40,7 @@ NODE_DEFINE(Integrator)
SOCKET_INT(max_transmission_bounce, "Max Transmission Bounce", 7);
SOCKET_INT(max_volume_bounce, "Max Volume Bounce", 7);
+ SOCKET_INT(transparent_min_bounce, "Transparent Min Bounce", 0);
SOCKET_INT(transparent_max_bounce, "Transparent Max Bounce", 7);
SOCKET_INT(ao_bounces, "AO Bounces", 0);
@@ -100,6 +102,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
KernelIntegrator *kintegrator = &dscene->data.integrator;
/* integrator parameters */
+ kintegrator->min_bounce = min_bounce + 1;
kintegrator->max_bounce = max_bounce + 1;
kintegrator->max_diffuse_bounce = max_diffuse_bounce + 1;
@@ -107,6 +110,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
kintegrator->max_transmission_bounce = max_transmission_bounce + 1;
kintegrator->max_volume_bounce = max_volume_bounce + 1;
+ kintegrator->transparent_min_bounce = transparent_min_bounce + 1;
kintegrator->transparent_max_bounce = transparent_max_bounce + 1;
if (ao_bounces == 0) {
diff --git a/intern/cycles/render/integrator.h b/intern/cycles/render/integrator.h
index 6acc68a7402..32d84c27072 100644
--- a/intern/cycles/render/integrator.h
+++ b/intern/cycles/render/integrator.h
@@ -31,6 +31,7 @@ class Integrator : public Node {
public:
NODE_DECLARE
+ int min_bounce;
int max_bounce;
int max_diffuse_bounce;
@@ -38,6 +39,7 @@ class Integrator : public Node {
int max_transmission_bounce;
int max_volume_bounce;
+ int transparent_min_bounce;
int transparent_max_bounce;
int ao_bounces;
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 757aa8048b0..8e7969cfbaf 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -396,7 +396,7 @@ void ImageTextureNode::compile(OSLCompiler &compiler)
if (slot == -1) {
compiler.parameter_texture(
- "filename", filename, compress_as_srgb ? known_colorspace : u_colorspace_raw);
+ "filename", filename, compress_as_srgb ? u_colorspace_raw : known_colorspace);
}
else {
compiler.parameter_texture("filename", slot);
@@ -584,7 +584,7 @@ void EnvironmentTextureNode::compile(OSLCompiler &compiler)
if (slot == -1) {
compiler.parameter_texture(
- "filename", filename, compress_as_srgb ? known_colorspace : u_colorspace_raw);
+ "filename", filename, compress_as_srgb ? u_colorspace_raw : known_colorspace);
}
else {
compiler.parameter_texture("filename", slot);