Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/svm/svm_checker.h
| Show All 26 Lines | ccl_device float svm_checker(float3 p) | ||||
| int xi = abs(float_to_int(floorf(p.x))); | int xi = abs(float_to_int(floorf(p.x))); | ||||
| int yi = abs(float_to_int(floorf(p.y))); | int yi = abs(float_to_int(floorf(p.y))); | ||||
| int zi = abs(float_to_int(floorf(p.z))); | int zi = abs(float_to_int(floorf(p.z))); | ||||
| return ((xi % 2 == yi % 2) == (zi % 2)) ? 1.0f : 0.0f; | return ((xi % 2 == yi % 2) == (zi % 2)) ? 1.0f : 0.0f; | ||||
| } | } | ||||
| ccl_device void svm_node_tex_checker(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node) | ccl_device_noinline void svm_node_tex_checker(const KernelGlobals *kg, | ||||
| ShaderData *sd, | |||||
| float *stack, | |||||
| uint4 node) | |||||
| { | { | ||||
| uint co_offset, color1_offset, color2_offset, scale_offset; | uint co_offset, color1_offset, color2_offset, scale_offset; | ||||
| uint color_offset, fac_offset; | uint color_offset, fac_offset; | ||||
| svm_unpack_node_uchar4(node.y, &co_offset, &color1_offset, &color2_offset, &scale_offset); | svm_unpack_node_uchar4(node.y, &co_offset, &color1_offset, &color2_offset, &scale_offset); | ||||
| svm_unpack_node_uchar2(node.z, &color_offset, &fac_offset); | svm_unpack_node_uchar2(node.z, &color_offset, &fac_offset); | ||||
| float3 co = stack_load_float3(stack, co_offset); | float3 co = stack_load_float3(stack, co_offset); | ||||
| Show All 13 Lines | |||||