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>2013-06-11 00:34:34 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-11 00:34:34 +0400
commit9d3ad07f1417fdc959ee3d3e86a7bff1c2ee6d80 (patch)
tree48ad22788cee5d1ded2bbbfc6edb7003fd054b6f /intern/cycles/render/background.cpp
parentd16a608f6d5cfdb45c0a72aaa7c5cbc0ebe19928 (diff)
Cycles: ray visibility panel is now also available for the world, works same as
meshes and lamps. The light path node already made this possible but it's a bit faster to render this way and convenient.
Diffstat (limited to 'intern/cycles/render/background.cpp')
-rw-r--r--intern/cycles/render/background.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/intern/cycles/render/background.cpp b/intern/cycles/render/background.cpp
index 76d26dd34b5..3513665f256 100644
--- a/intern/cycles/render/background.cpp
+++ b/intern/cycles/render/background.cpp
@@ -37,6 +37,8 @@ Background::Background()
use = true;
+ visibility = ~0;
+
transparent = false;
need_update = true;
}
@@ -64,6 +66,15 @@ void Background::device_update(Device *device, DeviceScene *dscene, Scene *scene
else
kbackground->shader = scene->shader_manager->get_shader_id(scene->default_empty);
+ if(!(visibility & PATH_RAY_DIFFUSE))
+ kbackground->shader |= SHADER_EXCLUDE_DIFFUSE;
+ if(!(visibility & PATH_RAY_GLOSSY))
+ kbackground->shader |= SHADER_EXCLUDE_GLOSSY;
+ if(!(visibility & PATH_RAY_TRANSMIT))
+ kbackground->shader |= SHADER_EXCLUDE_TRANSMIT;
+ if(!(visibility & PATH_RAY_CAMERA))
+ kbackground->shader |= SHADER_EXCLUDE_CAMERA;
+
need_update = false;
}
@@ -76,7 +87,8 @@ bool Background::modified(const Background& background)
return !(transparent == background.transparent &&
use == background.use &&
ao_factor == background.ao_factor &&
- ao_distance == background.ao_distance);
+ ao_distance == background.ao_distance &&
+ visibility == background.visibility);
}
void Background::tag_update(Scene *scene)