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
This commit is contained in:
Thomas Dinges
2014-09-05 20:39:35 +02:00
parent cdd1d5a93c
commit 8243c55f14
11 changed files with 71 additions and 30 deletions

View File

@@ -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 */