Fix T42818: Cycles SSS passes are incorrect for SSS size of 0

This was caused by some internal optimization which evaluated SSS with
size of zero as BSDF but used different ID so the evaluation result
didn't appear in regular diffuse pass.

This lead to situation when SSS data was nowhere stored if the
size was zero.

Now SSS with zero size and close-to-zero sizes will be handled in the
same way from the passes point of view.
This commit is contained in:
Sergey Sharybin 2014-12-10 17:28:44 +05:00
parent 602250d9fe
commit 7366283c01
1 changed files with 1 additions and 1 deletions

View File

@ -681,7 +681,7 @@ ccl_device float3 shader_bsdf_subsurface(KernelGlobals *kg, ShaderData *sd)
for(int i = 0; i< sd->num_closure; i++) {
ShaderClosure *sc = &sd->closure[i];
if(CLOSURE_IS_BSSRDF(sc->type))
if(CLOSURE_IS_BSSRDF(sc->type) || CLOSURE_IS_BSDF_BSSRDF(sc->type))
eval += sc->weight;
}