Cycles: disable Scrambling Distance UI when using Sobol Burley

Contributed by Alaska.

Differential Revision: https://developer.blender.org/D15794
This commit is contained in:
Brecht Van Lommel 2022-08-29 16:41:49 +02:00
parent 21acfbe348
commit 42cff95519
2 changed files with 3 additions and 1 deletions

View File

@ -305,6 +305,7 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
layout.separator()
heading = layout.column(align=True, heading="Scrambling Distance")
heading.active = not cscene.sampling_pattern == 'SOBOL_BURLEY'
heading.prop(cscene, "auto_scrambling_distance", text="Automatic")
heading.prop(cscene, "preview_scrambling_distance", text="Viewport")
heading.prop(cscene, "scrambling_distance", text="Multiplier")

View File

@ -385,7 +385,8 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background)
/* Only use scrambling distance in the viewport if user wants to. */
bool preview_scrambling_distance = get_boolean(cscene, "preview_scrambling_distance");
if (preview && !preview_scrambling_distance) {
if ((preview && !preview_scrambling_distance) ||
sampling_pattern == SAMPLING_PATTERN_SOBOL_BURLEY) {
scrambling_distance = 1.0f;
}