21 return (1.0f / 6.0f) * (a * (a * (-a + 3.0f) - 3.0f) + 1.0f);
25 return (1.0f / 6.0f) * (a * a * (3.0f * a - 6.0f) + 4.0f);
29 return (1.0f / 6.0f) * (a * (a * (-3.0f * a + 3.0f) + 3.0f) + 1.0f);
33 return (1.0f / 6.0f) * (a * a * a);
64 x = (
x * info.width) - 0.5f;
65 y = (
y * info.height) - 0.5f;
75 float x0 = (px +
cubic_h0(fx) + 0.5f) / info.width;
76 float x1 = (px +
cubic_h1(fx) + 0.5f) / info.width;
77 float y0 = (py +
cubic_h0(fy) + 0.5f) / info.height;
78 float y1 = (py +
cubic_h1(fy) + 0.5f) / info.height;
91 const int texture_type = info.data_type;
ccl_device float cubic_g0(const float a)
ccl_device_noinline T kernel_tex_image_interp_bicubic(const ccl_global TextureInfo &info, float x, float y)
ccl_device float cubic_h1(const float a)
ccl_device float cubic_w3(const float a)
CCL_NAMESPACE_BEGIN ccl_device_inline float frac(const float x, ccl_private int *ix)
ccl_device float4 kernel_tex_image_interp(KernelGlobals kg, const int id, const float x, float y)
ccl_device float cubic_g1(const float a)
ccl_device float cubic_w2(const float a)
ccl_device float cubic_h0(const float a)
ccl_device float cubic_w0(const float a)
ccl_device float cubic_w1(const float a)
#define kernel_data_fetch(name, index)
const ThreadKernelGlobalsCPU * KernelGlobals
#define ccl_device_inline
#define ccl_device_noinline
ccl_device_forceinline T ccl_gpu_tex_object_read_2D(const ccl_gpu_tex_object_2D texobj, const float x, const float y)
#define CCL_NAMESPACE_END
CUtexObject ccl_gpu_tex_object_2D
ccl_device_forceinline float4 ccl_gpu_tex_object_read_2D< float4 >(const ccl_gpu_tex_object_2D texobj, const float x, const float y)
ccl_device_forceinline float ccl_gpu_tex_object_read_2D< float >(const ccl_gpu_tex_object_2D texobj, const float x, const float y)
ccl_device_inline int float_to_int(const float f)
@ IMAGE_DATA_TYPE_USHORT4