Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/device/cpu/image.h
| Show First 20 Lines • Show All 577 Lines • ▼ Show 20 Lines | switch ((interp == INTERPOLATION_NONE) ? info.interpolation : interp) { | ||||
| return interp_3d_cubic(acc, x, y, z); | return interp_3d_cubic(acc, x, y, z); | ||||
| } | } | ||||
| } | } | ||||
| }; | }; | ||||
| #endif | #endif | ||||
| #undef SET_CUBIC_SPLINE_WEIGHTS | #undef SET_CUBIC_SPLINE_WEIGHTS | ||||
| ccl_device float4 kernel_tex_image_interp(const KernelGlobals *kg, int id, float x, float y) | ccl_device float4 kernel_tex_image_interp(KernelGlobals kg, int id, float x, float y) | ||||
| { | { | ||||
| const TextureInfo &info = kernel_tex_fetch(__texture_info, id); | const TextureInfo &info = kernel_tex_fetch(__texture_info, id); | ||||
| switch (info.data_type) { | switch (info.data_type) { | ||||
| case IMAGE_DATA_TYPE_HALF: | case IMAGE_DATA_TYPE_HALF: | ||||
| return TextureInterpolator<half>::interp(info, x, y); | return TextureInterpolator<half>::interp(info, x, y); | ||||
| case IMAGE_DATA_TYPE_BYTE: | case IMAGE_DATA_TYPE_BYTE: | ||||
| return TextureInterpolator<uchar>::interp(info, x, y); | return TextureInterpolator<uchar>::interp(info, x, y); | ||||
| Show All 11 Lines | case IMAGE_DATA_TYPE_FLOAT4: | ||||
| return TextureInterpolator<float4>::interp(info, x, y); | return TextureInterpolator<float4>::interp(info, x, y); | ||||
| default: | default: | ||||
| assert(0); | assert(0); | ||||
| return make_float4( | return make_float4( | ||||
| TEX_IMAGE_MISSING_R, TEX_IMAGE_MISSING_G, TEX_IMAGE_MISSING_B, TEX_IMAGE_MISSING_A); | TEX_IMAGE_MISSING_R, TEX_IMAGE_MISSING_G, TEX_IMAGE_MISSING_B, TEX_IMAGE_MISSING_A); | ||||
| } | } | ||||
| } | } | ||||
| ccl_device float4 kernel_tex_image_interp_3d(const KernelGlobals *kg, | ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals kg, | ||||
| int id, | int id, | ||||
| float3 P, | float3 P, | ||||
| InterpolationType interp) | InterpolationType interp) | ||||
| { | { | ||||
| const TextureInfo &info = kernel_tex_fetch(__texture_info, id); | const TextureInfo &info = kernel_tex_fetch(__texture_info, id); | ||||
| if (info.use_transform_3d) { | if (info.use_transform_3d) { | ||||
| P = transform_point(&info.transform_3d, P); | P = transform_point(&info.transform_3d, P); | ||||
| Show All 35 Lines | |||||