Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-10 03:28:51 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-10 03:28:51 +0400
commit09b34e69d4c5fb4bc305f84188959bb49d1979f2 (patch)
treebbfafc91afa0d653501739290890122cafd1e704 /intern/cycles/render/light.cpp
parentb3fb373f89c1caa1d596414bcac9a2ca96f98348 (diff)
Fix #33131: more useful cycles behavior for layers that are both marked excluded
and as mask layer. Now it will still use the mask, and have no further influence rather than just being excluded entirely.
Diffstat (limited to 'intern/cycles/render/light.cpp')
-rw-r--r--intern/cycles/render/light.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index d77516a1b18..4173da453fd 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -147,6 +147,10 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
Mesh *mesh = object->mesh;
bool have_emission = false;
+ /* skip if we are not visible for BSDFs */
+ if(!(object->visibility & (PATH_RAY_DIFFUSE|PATH_RAY_GLOSSY|PATH_RAY_TRANSMIT)))
+ continue;
+
/* skip if we have no emission shaders */
foreach(uint sindex, mesh->used_shaders) {
Shader *shader = scene->shaders[sindex];
@@ -183,6 +187,10 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
Mesh *mesh = object->mesh;
bool have_emission = false;
+ /* skip if we are not visible for BSDFs */
+ if(!(object->visibility & (PATH_RAY_DIFFUSE|PATH_RAY_GLOSSY|PATH_RAY_TRANSMIT)))
+ continue;
+
/* skip if we have no emission shaders */
foreach(uint sindex, mesh->used_shaders) {
Shader *shader = scene->shaders[sindex];