Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/svm/svm_gradient.h
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | if (type == NODE_BLEND_QUADRATIC_SPHERE) | ||||
| return r * r; | return r * r; | ||||
| else if (type == NODE_BLEND_SPHERICAL) | else if (type == NODE_BLEND_SPHERICAL) | ||||
| return r; | return r; | ||||
| } | } | ||||
| return 0.0f; | return 0.0f; | ||||
| } | } | ||||
| ccl_device void svm_node_tex_gradient(ShaderData *sd, float *stack, uint4 node) | ccl_device_noinline void svm_node_tex_gradient(ShaderData *sd, float *stack, uint4 node) | ||||
| { | { | ||||
| uint type, co_offset, color_offset, fac_offset; | uint type, co_offset, color_offset, fac_offset; | ||||
| svm_unpack_node_uchar4(node.y, &type, &co_offset, &fac_offset, &color_offset); | svm_unpack_node_uchar4(node.y, &type, &co_offset, &fac_offset, &color_offset); | ||||
| float3 co = stack_load_float3(stack, co_offset); | float3 co = stack_load_float3(stack, co_offset); | ||||
| float f = svm_gradient(co, (NodeGradientType)type); | float f = svm_gradient(co, (NodeGradientType)type); | ||||
| Show All 9 Lines | |||||