diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-06-07 22:59:23 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-06-07 22:59:23 +0400 |
commit | 58a290234b0719ce48854e2f6744575b353bf7d3 (patch) | |
tree | 8891bc5663c9b8e19cdaa2a1d58ec0e39ff3f2f3 /intern/cycles/blender/blender_object.cpp | |
parent | b20a7e01d046b95a79663da1a8072358709a5a8b (diff) |
Cycles: ray visibility options now work for lamps and mesh lights, with and without
multiple importance sampling, so you can disable them for diffuse/glossy/transmission.
The Light Path node here is still weak and does not give this info. To make that
work we'd need to evaluate the shader multiple times which is slow and we can't
detect well enough when it is actually needed.
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 5dbb46bda2e..75f0c48a8a2 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -159,6 +159,12 @@ void BlenderSync::sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSI light->use_mis = get_boolean(clamp, "use_multiple_importance_sampling"); light->samples = get_int(clamp, "samples"); + /* visibility */ + uint visibility = object_ray_visibility(b_ob); + light->use_diffuse = (visibility & PATH_RAY_DIFFUSE) != 0; + light->use_glossy = (visibility & PATH_RAY_GLOSSY) != 0; + light->use_transmission = (visibility & PATH_RAY_TRANSMIT) != 0; + /* tag */ light->tag_update(scene); } |