diff options
author | Thomas Dinges <blender@dingto.org> | 2014-09-05 22:39:35 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2014-09-05 22:39:35 +0400 |
commit | 8243c55f14ae2686723e6e3eaeb7b83c3f8100f3 (patch) | |
tree | 8e55e69edc15c683f7043eb45f3f92ce856f261c /intern/cycles/kernel/osl/osl_shader.cpp | |
parent | cdd1d5a93c432ddbee8a8e578b0c28781aef71da (diff) |
Cycles: Split caustics option, to allow separate control for Reflection and Refraction caustics.
This way artists can only disable/enable refraction or reflection caustics.
See Cycles logs for an example: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Cycles
Differential revision: https://developer.blender.org/D766
Diffstat (limited to 'intern/cycles/kernel/osl/osl_shader.cpp')
-rw-r--r-- | intern/cycles/kernel/osl/osl_shader.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/intern/cycles/kernel/osl/osl_shader.cpp b/intern/cycles/kernel/osl/osl_shader.cpp index 28135784db9..48498116874 100644 --- a/intern/cycles/kernel/osl/osl_shader.cpp +++ b/intern/cycles/kernel/osl/osl_shader.cpp @@ -164,11 +164,14 @@ static void flatten_surface_closure_tree(ShaderData *sd, int path_flag, CBSDFClosure *bsdf = (CBSDFClosure *)prim; int scattering = bsdf->scattering(); - /* no caustics option */ - if(scattering == LABEL_GLOSSY && (path_flag & PATH_RAY_DIFFUSE)) { + /* caustic options */ + if((scattering & LABEL_GLOSSY) && (path_flag & PATH_RAY_DIFFUSE)) { KernelGlobals *kg = sd->osl_globals; - if(kernel_data.integrator.no_caustics) + + if((!kernel_data.integrator.caustics_reflective && (scattering & LABEL_REFLECT)) || + (!kernel_data.integrator.caustics_refractive && (scattering & LABEL_TRANSMIT))) { return; + } } /* sample weight */ |