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:
2017-08-02 15:23:50 +02:00
parent d1752167a9
commit 5e4bad2c00
8 changed files with 7 additions and 25 deletions

View File

@@ -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;