diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-28 18:06:32 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-28 18:47:53 +0300 |
commit | c9238e638fd5f6b3e4cf22d879d397dee1b09b48 (patch) | |
tree | c03058522ffe94482870ad084bd76ec43823222e /intern/cycles/kernel | |
parent | 4e8c5f4bc8c77d70328797ea179bb1c7ca0e51e2 (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/kernel')
-rw-r--r-- | intern/cycles/kernel/kernel_path_state.h | 8 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h index cdca0b1f9bf..8735e3208db 100644 --- a/intern/cycles/kernel/kernel_path_state.h +++ b/intern/cycles/kernel/kernel_path_state.h @@ -209,8 +209,8 @@ ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg, return 0.0f; } else if (state->flag & PATH_RAY_TRANSPARENT) { - /* Do at least one bounce without RR. */ - if (state->transparent_bounce <= 1) { + /* Do at least specified number of bounces without RR. */ + if (state->transparent_bounce <= kernel_data.integrator.transparent_min_bounce) { return 1.0f; } #ifdef __SHADOW_TRICKS__ @@ -221,8 +221,8 @@ ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg, #endif } else { - /* Do at least one bounce without RR. */ - if (state->bounce <= 1) { + /* Do at least specified number of bounces without RR. */ + if (state->bounce <= kernel_data.integrator.min_bounce) { return 1.0f; } #ifdef __SHADOW_TRICKS__ diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index b93af6c068c..a1d950bbc70 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -1271,6 +1271,7 @@ typedef struct KernelIntegrator { int portal_offset; /* bounces */ + int min_bounce; int max_bounce; int max_diffuse_bounce; @@ -1281,6 +1282,7 @@ typedef struct KernelIntegrator { int ao_bounces; /* transparent */ + int transparent_min_bounce; int transparent_max_bounce; int transparent_shadows; @@ -1325,7 +1327,7 @@ typedef struct KernelIntegrator { int max_closures; - int pad1, pad2, pad3; + int pad1; } KernelIntegrator; static_assert_align(KernelIntegrator, 16); |