diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-02-17 03:47:18 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-02-17 18:26:24 +0300 |
commit | 68dd7617d705dd255b29b99074afa107ce38031e (patch) | |
tree | 1e253ab76b87e7f22a09db2f1137db3a1b8ecb6c /intern/cycles/kernel/kernel_shadow.h | |
parent | 8119f0aad21c3ce88e82d68ed20cd5a8edc99703 (diff) |
Cycles: add utility functions for zero float2/float3/float4/transform
Ref D8237, T78710
Diffstat (limited to 'intern/cycles/kernel/kernel_shadow.h')
-rw-r--r-- | intern/cycles/kernel/kernel_shadow.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_shadow.h b/intern/cycles/kernel/kernel_shadow.h index 07043e6a769..3b124122fba 100644 --- a/intern/cycles/kernel/kernel_shadow.h +++ b/intern/cycles/kernel/kernel_shadow.h @@ -165,7 +165,7 @@ ccl_device bool shadow_blocked_transparent_all_loop(KernelGlobals *kg, * shade them. */ if (!blocked && num_hits > 0) { - float3 throughput = make_float3(1.0f, 1.0f, 1.0f); + float3 throughput = one_float3(); float3 Pend = ray->P + ray->D * ray->t; float last_t = 0.0f; int bounce = state->transparent_bounce; @@ -305,7 +305,7 @@ ccl_device bool shadow_blocked_transparent_stepped_loop(KernelGlobals *kg, # endif # endif if (blocked && is_transparent_isect) { - float3 throughput = make_float3(1.0f, 1.0f, 1.0f); + float3 throughput = one_float3(); float3 Pend = ray->P + ray->D * ray->t; int bounce = state->transparent_bounce; # ifdef __VOLUME__ @@ -390,7 +390,7 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg, Ray *ray, float3 *shadow) { - *shadow = make_float3(1.0f, 1.0f, 1.0f); + *shadow = one_float3(); #if !defined(__KERNEL_OPTIX__) /* Some common early checks. * Avoid conditional trace call in OptiX though, since those hurt performance there. |