Fix #30955: cycles render issue with lights that have shadow casting disabled.
This commit is contained in:
@@ -147,14 +147,14 @@ __device_inline float path_state_terminate_probability(KernelGlobals *kg, PathSt
|
|||||||
|
|
||||||
__device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray *ray, float3 *shadow)
|
__device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray *ray, float3 *shadow)
|
||||||
{
|
{
|
||||||
|
*shadow = make_float3(1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
if(ray->t == 0.0f)
|
if(ray->t == 0.0f)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Intersection isect;
|
Intersection isect;
|
||||||
bool result = scene_intersect(kg, ray, PATH_RAY_SHADOW_OPAQUE, &isect);
|
bool result = scene_intersect(kg, ray, PATH_RAY_SHADOW_OPAQUE, &isect);
|
||||||
|
|
||||||
*shadow = make_float3(1.0f, 1.0f, 1.0f);
|
|
||||||
|
|
||||||
#ifdef __TRANSPARENT_SHADOWS__
|
#ifdef __TRANSPARENT_SHADOWS__
|
||||||
if(result && kernel_data.integrator.transparent_shadows) {
|
if(result && kernel_data.integrator.transparent_shadows) {
|
||||||
/* transparent shadows work in such a way to try to minimize overhead
|
/* transparent shadows work in such a way to try to minimize overhead
|
||||||
|
Reference in New Issue
Block a user