forked from bartvdbraak/blender
Cycles: remove option to disable transparent shadows globally.
We already detect this automatically based on shading nodes and per shader settings, and performance of this option is ok now all devices. Differential Revision: https://developer.blender.org/D2767
This commit is contained in:
parent
d1752167a9
commit
5e4bad2c00
@ -37,7 +37,6 @@ class AddPresetIntegrator(AddPresetBase, Operator):
|
||||
"cycles.transmission_bounces",
|
||||
"cycles.volume_bounces",
|
||||
"cycles.transparent_max_bounces",
|
||||
"cycles.use_transparent_shadows",
|
||||
"cycles.caustics_reflective",
|
||||
"cycles.caustics_refractive",
|
||||
"cycles.blur_glossy"
|
||||
|
@ -349,11 +349,6 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
min=0, max=1024,
|
||||
default=8,
|
||||
)
|
||||
cls.use_transparent_shadows = BoolProperty(
|
||||
name="Transparent Shadows",
|
||||
description="Use transparency of surfaces for rendering shadows",
|
||||
default=True,
|
||||
)
|
||||
|
||||
cls.volume_step_size = FloatProperty(
|
||||
name="Step Size",
|
||||
|
@ -292,7 +292,6 @@ class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel):
|
||||
sub = col.column(align=True)
|
||||
sub.label("Transparency:")
|
||||
sub.prop(cscene, "transparent_max_bounces", text="Max")
|
||||
sub.prop(cscene, "use_transparent_shadows", text="Shadows")
|
||||
|
||||
col.separator()
|
||||
|
||||
|
@ -242,7 +242,6 @@ void BlenderSync::sync_integrator()
|
||||
integrator->max_volume_bounce = get_int(cscene, "volume_bounces");
|
||||
|
||||
integrator->transparent_max_bounce = get_int(cscene, "transparent_max_bounces");
|
||||
integrator->transparent_shadows = get_boolean(cscene, "use_transparent_shadows");
|
||||
|
||||
integrator->volume_max_steps = get_int(cscene, "volume_max_steps");
|
||||
integrator->volume_step_size = get_float(cscene, "volume_step_size");
|
||||
|
@ -39,7 +39,6 @@ NODE_DEFINE(Integrator)
|
||||
SOCKET_INT(max_volume_bounce, "Max Volume Bounce", 7);
|
||||
|
||||
SOCKET_INT(transparent_max_bounce, "Transparent Max Bounce", 7);
|
||||
SOCKET_BOOLEAN(transparent_shadows, "Transparent Shadows", false);
|
||||
|
||||
SOCKET_INT(ao_bounces, "AO Bounces", 0);
|
||||
|
||||
@ -121,19 +120,14 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
|
||||
* We only need to enable transparent shadows, if we actually have
|
||||
* transparent shaders in the scene. Otherwise we can disable it
|
||||
* to improve performance a bit. */
|
||||
if(transparent_shadows) {
|
||||
kintegrator->transparent_shadows = false;
|
||||
foreach(Shader *shader, scene->shaders) {
|
||||
/* keep this in sync with SD_HAS_TRANSPARENT_SHADOW in shader.cpp */
|
||||
if((shader->has_surface_transparent && shader->use_transparent_shadow) || shader->has_volume) {
|
||||
kintegrator->transparent_shadows = true;
|
||||
break;
|
||||
}
|
||||
kintegrator->transparent_shadows = false;
|
||||
foreach(Shader *shader, scene->shaders) {
|
||||
/* keep this in sync with SD_HAS_TRANSPARENT_SHADOW in shader.cpp */
|
||||
if((shader->has_surface_transparent && shader->use_transparent_shadow) || shader->has_volume) {
|
||||
kintegrator->transparent_shadows = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
kintegrator->transparent_shadows = false;
|
||||
}
|
||||
|
||||
kintegrator->volume_max_steps = volume_max_steps;
|
||||
kintegrator->volume_step_size = volume_step_size;
|
||||
|
@ -39,7 +39,6 @@ public:
|
||||
int max_volume_bounce;
|
||||
|
||||
int transparent_max_bounce;
|
||||
bool transparent_shadows;
|
||||
|
||||
int ao_bounces;
|
||||
|
||||
|
@ -721,7 +721,6 @@ DeviceRequestedFeatures Session::get_requested_device_features()
|
||||
BakeManager *bake_manager = scene->bake_manager;
|
||||
requested_features.use_baking = bake_manager->get_baking();
|
||||
requested_features.use_integrator_branched = (scene->integrator->method == Integrator::BRANCHED_PATH);
|
||||
requested_features.use_transparent &= scene->integrator->transparent_shadows;
|
||||
requested_features.use_denoising = params.use_denoising;
|
||||
|
||||
return requested_features;
|
||||
|
@ -503,9 +503,7 @@ void ShaderManager::device_update_common(Device *device,
|
||||
KernelIntegrator *kintegrator = &dscene->data.integrator;
|
||||
kintegrator->use_volumes = has_volumes;
|
||||
/* TODO(sergey): De-duplicate with flags set in integrator.cpp. */
|
||||
if(scene->integrator->transparent_shadows) {
|
||||
kintegrator->transparent_shadows = has_transparent_shadow;
|
||||
}
|
||||
kintegrator->transparent_shadows = has_transparent_shadow;
|
||||
}
|
||||
|
||||
void ShaderManager::device_free_common(Device *device, DeviceScene *dscene, Scene *scene)
|
||||
|
Loading…
Reference in New Issue
Block a user