Commit: a6b2650c7d94048591ab7c8b7b8fc4d533424bfb Author: Sergey Sharybin Date: Tue Jul 28 16:31:27 2015 +0200 Branches: master https://developer.blender.org/rBa6b2650c7d94048591ab7c8b7b8fc4d533424bfb
Cycles: Correction to image extension type commits Clipping wasn't working totally correct, need to check original coordinates, not the integer ones, Now CPU gives the same exact results for both SVM and OSL, CUDA is still doing something crazy with edges. =================================================================== M intern/cycles/kernel/kernel_compat_cpu.h =================================================================== diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h index 37387d7..d02670f 100644 --- a/intern/cycles/kernel/kernel_compat_cpu.h +++ b/intern/cycles/kernel/kernel_compat_cpu.h @@ -144,7 +144,7 @@ template<typename T> struct texture_image { iy = wrap_periodic(iy, height); break; case EXTENSION_CLIP: - if (ix < 0 || iy < 0 || ix >= width || iy >= height) { + if (x < 0.0f || y < 0.0f || x >= width || y >= height) { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } /* Fall through. */ @@ -168,7 +168,7 @@ template<typename T> struct texture_image { niy = wrap_periodic(iy+1, height); break; case EXTENSION_CLIP: - if (ix < 0 || iy < 0 || ix >= width || iy >= height) { + if (x < 0.0f || y < 0.0f || x >= width || y >= height) { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } /* Fall through. */ @@ -208,7 +208,7 @@ template<typename T> struct texture_image { nniy = wrap_periodic(iy+2, height); break; case EXTENSION_CLIP: - if (ix < 0 || iy < 0 || ix >= width || iy >= height) { + if (x < 0.0f || y < 0.0f || x >= width || y >= height) { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } /* Fall through. */ @@ -279,7 +279,7 @@ template<typename T> struct texture_image { iz = wrap_periodic(iz, depth); break; case EXTENSION_CLIP: - if (ix < 0 || iy < 0 || ix >= width || iy >= height) { + if (x < 0.0f || y < 0.0f || x >= width || y >= height) { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } /* Fall through. */ @@ -308,7 +308,7 @@ template<typename T> struct texture_image { niz = wrap_periodic(iz+1, depth); break; case EXTENSION_CLIP: - if (ix < 0 || iy < 0 || ix >= width || iy >= height) { + if (x < 0.0f || y < 0.0f || x >= width || y >= height) { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } /* Fall through. */ @@ -363,7 +363,7 @@ template<typename T> struct texture_image { nniz = wrap_periodic(iz+2, depth); break; case EXTENSION_CLIP: - if (ix < 0 || iy < 0 || ix >= width || iy >= height) { + if (x < 0.0f || y < 0.0f || x >= width || y >= height) { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } /* Fall through. */ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs