diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-04 01:34:51 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-04 01:34:51 +0400 |
commit | 838949c3e76eb140bb0f776fbbd0fd61fac08f49 (patch) | |
tree | 5f59c6410a1ad65d9dee684368676f499907cf65 /intern/cycles/kernel/kernel_path.h | |
parent | 879859e0cc4e0176e1a054fa63e94c3e506a0a7c (diff) |
Fix #35207: addition to previous fix to avoid OSL getting uninitialized
ray differentials for lighting, which could cause bad texture filtering
artifacts or performance.
Diffstat (limited to 'intern/cycles/kernel/kernel_path.h')
-rw-r--r-- | intern/cycles/kernel/kernel_path.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index 4e50b84291a..faf0ac6035c 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -414,6 +414,8 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample, #ifdef __OBJECT_MOTION__ light_ray.time = sd.time; #endif + light_ray.dP = sd.dP; + light_ray.dD = differential3_zero(); if(!shadow_blocked(kg, &state, &light_ray, &ao_shadow)) path_radiance_accum_ao(&L, throughput, ao_bsdf, ao_shadow, state.bounce); @@ -640,6 +642,8 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray #ifdef __OBJECT_MOTION__ light_ray.time = sd.time; #endif + light_ray.dP = sd.dP; + light_ray.dD = differential3_zero(); if(!shadow_blocked(kg, &state, &light_ray, &ao_shadow)) path_radiance_accum_ao(L, throughput, ao_bsdf, ao_shadow, state.bounce); @@ -757,6 +761,8 @@ __device_noinline void kernel_path_non_progressive_lighting(KernelGlobals *kg, R #ifdef __OBJECT_MOTION__ light_ray.time = sd->time; #endif + light_ray.dP = sd->dP; + light_ray.dD = differential3_zero(); if(!shadow_blocked(kg, &state, &light_ray, &ao_shadow)) path_radiance_accum_ao(L, throughput*num_samples_inv, ao_bsdf, ao_shadow, state.bounce); |