diff options
author | Ethan-Hall <Ethan1080> | 2022-03-11 16:26:01 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-03-11 20:27:58 +0300 |
commit | 3902bebf1809e4243b2184852aeb82e57ca68421 (patch) | |
tree | c1ece28acc85a5e30f0894155b1b705b7daff6cf /intern/cycles | |
parent | 1842cef210a9cfd916044e1e5d7b68994af7806f (diff) |
Cycles: make smart interpolation fallback to cubic for GPU
Matching CPU and Eevee behavior.
Differential Revision: https://developer.blender.org/D14296
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/device/gpu/image.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/device/gpu/image.h b/intern/cycles/kernel/device/gpu/image.h index 9c92f6a693c..83e7aa869c1 100644 --- a/intern/cycles/kernel/device/gpu/image.h +++ b/intern/cycles/kernel/device/gpu/image.h @@ -186,7 +186,7 @@ ccl_device float4 kernel_tex_image_interp(KernelGlobals kg, int id, float x, flo const int texture_type = info.data_type; if (texture_type == IMAGE_DATA_TYPE_FLOAT4 || texture_type == IMAGE_DATA_TYPE_BYTE4 || texture_type == IMAGE_DATA_TYPE_HALF4 || texture_type == IMAGE_DATA_TYPE_USHORT4) { - if (info.interpolation == INTERPOLATION_CUBIC) { + if (info.interpolation == INTERPOLATION_CUBIC || info.interpolation == INTERPOLATION_SMART) { return kernel_tex_image_interp_bicubic<float4>(info, x, y); } else { @@ -198,7 +198,7 @@ ccl_device float4 kernel_tex_image_interp(KernelGlobals kg, int id, float x, flo else { float f; - if (info.interpolation == INTERPOLATION_CUBIC) { + if (info.interpolation == INTERPOLATION_CUBIC || info.interpolation == INTERPOLATION_SMART) { f = kernel_tex_image_interp_bicubic<float>(info, x, y); } else { @@ -241,7 +241,7 @@ ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals kg, #endif if (texture_type == IMAGE_DATA_TYPE_FLOAT4 || texture_type == IMAGE_DATA_TYPE_BYTE4 || texture_type == IMAGE_DATA_TYPE_HALF4 || texture_type == IMAGE_DATA_TYPE_USHORT4) { - if (interpolation == INTERPOLATION_CUBIC) { + if (interpolation == INTERPOLATION_CUBIC || interpolation == INTERPOLATION_SMART) { return kernel_tex_image_interp_tricubic<float4>(info, x, y, z); } else { @@ -252,7 +252,7 @@ ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals kg, else { float f; - if (interpolation == INTERPOLATION_CUBIC) { + if (interpolation == INTERPOLATION_CUBIC || interpolation == INTERPOLATION_SMART) { f = kernel_tex_image_interp_tricubic<float>(info, x, y, z); } else { |