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.
This commit is contained in:
Brecht Van Lommel
2013-06-07 18:59:23 +00:00
parent b20a7e01d0
commit 58a290234b
10 changed files with 83 additions and 14 deletions

View File

@@ -232,12 +232,9 @@ __device_inline void path_radiance_accum_light(PathRadiance *L, float3 throughpu
L->direct_transmission += throughput*bsdf_eval->transmission*shadow;
if(is_lamp) {
float3 sum = throughput*(bsdf_eval->diffuse + bsdf_eval->glossy + bsdf_eval->transmission);
L->shadow.x += shadow.x*shadow_fac;
L->shadow.y += shadow.y*shadow_fac;
L->shadow.z += shadow.z*shadow_fac;
L->shadow.w += average(sum);
}
}
else {