Cycles: Expose "Max Bounces" for the world light.
When using MIS, the world is treated as regular light and in this case we can now also limit the maximum amount of bounces, the background light will contribute to the scene. This can improve performance in some cases, where it's e.g. sufficient to only have a contribution on first 1-2 bounces. Examples can be found in the differential. Differential revision: https://developer.blender.org/D1399
This commit is contained in:
@@ -739,6 +739,12 @@ class CyclesWorldSettings(bpy.types.PropertyGroup):
|
||||
min=1, max=10000,
|
||||
default=4,
|
||||
)
|
||||
cls.max_bounces = IntProperty(
|
||||
name="Max Bounces",
|
||||
description="Maximum number of bounces the background light will contribute to the render",
|
||||
min=0, max=1024,
|
||||
default=1024,
|
||||
)
|
||||
cls.homogeneous_volume = BoolProperty(
|
||||
name="Homogeneous Volume",
|
||||
description="When using volume rendering, assume volume has the same density everywhere"
|
||||
|
@@ -1040,6 +1040,7 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
|
||||
sub.prop(cworld, "sample_map_resolution")
|
||||
if use_branched_path(context):
|
||||
sub.prop(cworld, "samples")
|
||||
sub.prop(cworld, "max_bounces")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Volume:")
|
||||
|
@@ -215,6 +215,7 @@ void BlenderSync::sync_background_light(bool use_portal)
|
||||
light->map_resolution = get_int(cworld, "sample_map_resolution");
|
||||
light->shader = scene->default_background;
|
||||
light->use_mis = sample_as_light;
|
||||
light->max_bounces = get_int(cworld, "max_bounces");
|
||||
|
||||
int samples = get_int(cworld, "samples");
|
||||
if(get_boolean(cscene, "use_square_samples"))
|
||||
|
Reference in New Issue
Block a user