diff options
-rw-r--r-- | intern/cycles/device/device.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/device/device.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 2 | ||||
-rw-r--r-- | intern/cycles/render/scene.h | 2 | ||||
-rw-r--r-- | intern/cycles/render/svm.cpp | 3 |
5 files changed, 9 insertions, 4 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp index f43ccffe461..01c50817709 100644 --- a/intern/cycles/device/device.cpp +++ b/intern/cycles/device/device.cpp @@ -157,6 +157,8 @@ Device *Device::create(DeviceType type, bool background, int threads) return NULL; } + device->device_type = type; + return device; } diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h index 0b3c66dbb2c..360478cfd75 100644 --- a/intern/cycles/device/device.h +++ b/intern/cycles/device/device.h @@ -75,12 +75,14 @@ class Device { protected: Device() {} - DeviceType type; + DeviceType device_type; bool background; public: virtual ~Device() {} + DeviceType type() { return device_type; } + /* info */ virtual string description() = 0; diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index bda037e88cc..c789601cd27 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -44,7 +44,7 @@ CCL_NAMESPACE_BEGIN #define __EMISSION__ #define __TEXTURES__ #define __HOLDOUT__ -//#define __MULTI_CLOSURE__ +#define __MULTI_CLOSURE__ //#define __TRANSPARENT_SHADOWS__ //#define __MULTI_LIGHT__ #endif diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h index a969dd66c4c..c191f8a56e5 100644 --- a/intern/cycles/render/scene.h +++ b/intern/cycles/render/scene.h @@ -109,7 +109,7 @@ public: SceneParams() { shadingsystem = SVM; - use_multi_closure = false; + use_multi_closure = true; bvh_type = BVH_DYNAMIC; use_bvh_cache = false; use_bvh_spatial_split = false; diff --git a/intern/cycles/render/svm.cpp b/intern/cycles/render/svm.cpp index a1687ae5e29..b9c4219f852 100644 --- a/intern/cycles/render/svm.cpp +++ b/intern/cycles/render/svm.cpp @@ -58,6 +58,7 @@ void SVMShaderManager::device_update(Device *device, DeviceScene *dscene, Scene } bool sunsky_done = false; + bool use_multi_closure = (scene->params.use_multi_closure && device->type() != DEVICE_OPENCL); for(i = 0; i < scene->shaders.size(); i++) { Shader *shader = scene->shaders[i]; @@ -70,7 +71,7 @@ void SVMShaderManager::device_update(Device *device, DeviceScene *dscene, Scene scene->light_manager->need_update = true; SVMCompiler compiler(scene->shader_manager, scene->image_manager, - scene->params.use_multi_closure); + use_multi_closure); compiler.sunsky = (sunsky_done)? NULL: &dscene->data.sunsky; compiler.background = ((int)i == scene->default_background); compiler.compile(shader, svm_nodes, i); |