diff options
author | Ethan-Hall <Ethan1080> | 2022-03-23 17:53:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-03-23 22:06:12 +0300 |
commit | f5066d43ae572de929fea31cbc9e091e288b2435 (patch) | |
tree | c585a7551aae6b899064e88b570046f606a76f7a /intern/cycles/kernel/geom/subd_triangle.h | |
parent | 4e56e738a8f35228873d6e84d9e9f8b0e7a74a59 (diff) |
Cleanup: use make_float4(f) zero_float4() to simplify code
Differential Revision: https://developer.blender.org/D14426
Diffstat (limited to 'intern/cycles/kernel/geom/subd_triangle.h')
-rw-r--r-- | intern/cycles/kernel/geom/subd_triangle.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/intern/cycles/kernel/geom/subd_triangle.h b/intern/cycles/kernel/geom/subd_triangle.h index 0ff5292b5b5..24e1e454b8c 100644 --- a/intern/cycles/kernel/geom/subd_triangle.h +++ b/intern/cycles/kernel/geom/subd_triangle.h @@ -566,9 +566,9 @@ ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals kg, #endif /* __PATCH_EVAL__ */ if (desc.element == ATTR_ELEMENT_FACE) { if (dx) - *dx = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + *dx = zero_float4(); if (dy) - *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + *dy = zero_float4(); return kernel_tex_fetch(__attributes_float4, desc.offset + subd_triangle_patch_face(kg, patch)); @@ -648,19 +648,19 @@ ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals kg, } else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { if (dx) - *dx = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + *dx = zero_float4(); if (dy) - *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + *dy = zero_float4(); return kernel_tex_fetch(__attributes_float4, desc.offset); } else { if (dx) - *dx = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + *dx = zero_float4(); if (dy) - *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + *dy = zero_float4(); - return make_float4(0.0f, 0.0f, 0.0f, 0.0f); + return zero_float4(); } } |