Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/svm/svm_map_range.h
| Show All 18 Lines | |||||
| /* Map Range Node */ | /* Map Range Node */ | ||||
| ccl_device_inline float smootherstep(float edge0, float edge1, float x) | ccl_device_inline float smootherstep(float edge0, float edge1, float x) | ||||
| { | { | ||||
| x = clamp(safe_divide((x - edge0), (edge1 - edge0)), 0.0f, 1.0f); | x = clamp(safe_divide((x - edge0), (edge1 - edge0)), 0.0f, 1.0f); | ||||
| return x * x * x * (x * (x * 6.0f - 15.0f) + 10.0f); | return x * x * x * (x * (x * 6.0f - 15.0f) + 10.0f); | ||||
| } | } | ||||
| ccl_device_noinline int svm_node_map_range(ccl_global const KernelGlobals *kg, | ccl_device_noinline int svm_node_map_range(KernelGlobals kg, | ||||
| ccl_private ShaderData *sd, | ccl_private ShaderData *sd, | ||||
| ccl_private float *stack, | ccl_private float *stack, | ||||
| uint value_stack_offset, | uint value_stack_offset, | ||||
| uint parameters_stack_offsets, | uint parameters_stack_offsets, | ||||
| uint results_stack_offsets, | uint results_stack_offsets, | ||||
| int offset) | int offset) | ||||
| { | { | ||||
| uint from_min_stack_offset, from_max_stack_offset, to_min_stack_offset, to_max_stack_offset; | uint from_min_stack_offset, from_max_stack_offset, to_min_stack_offset, to_max_stack_offset; | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||