Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan-Hall <Ethan1080>2022-03-11 16:26:01 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-03-11 20:27:58 +0300
commit3902bebf1809e4243b2184852aeb82e57ca68421 (patch)
treec1ece28acc85a5e30f0894155b1b705b7daff6cf /intern/cycles
parent1842cef210a9cfd916044e1e5d7b68994af7806f (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.h8
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 {