[Bf-blender-cvs] [5c0d68d] blender-v2.76-release: Cycles: Fix missing z-coordinate check in volume sampling
Sergey Sharybin
noreply at git.blender.org
Fri Oct 9 13:32:35 CEST 2015
Commit: 5c0d68d6879644d6c305bdc48e32d6340e3723a5
Author: Sergey Sharybin
Date: Mon Oct 5 12:40:50 2015 +0500
Branches: blender-v2.76-release
https://developer.blender.org/rB5c0d68d6879644d6c305bdc48e32d6340e3723a5
Cycles: Fix missing z-coordinate check in volume sampling
===================================================================
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 ed145b4..7908293 100644
--- a/intern/cycles/kernel/kernel_compat_cpu.h
+++ b/intern/cycles/kernel/kernel_compat_cpu.h
@@ -279,7 +279,9 @@ template<typename T> struct texture_image {
iz = wrap_periodic(iz, depth);
break;
case EXTENSION_CLIP:
- if (x < 0.0f || y < 0.0f || x > 1.0f || y > 1.0f) {
+ if (x < 0.0f || y < 0.0f || z < 0.0f ||
+ x > 1.0f || y > 1.0f || z > 1.0f)
+ {
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
}
/* Fall through. */
@@ -308,7 +310,9 @@ template<typename T> struct texture_image {
niz = wrap_periodic(iz+1, depth);
break;
case EXTENSION_CLIP:
- if (x < 0.0f || y < 0.0f || x > 1.0f || y > 1.0f) {
+ if (x < 0.0f || y < 0.0f || z < 0.0f ||
+ x > 1.0f || y > 1.0f || z > 1.0f)
+ {
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
}
/* Fall through. */
@@ -363,7 +367,9 @@ template<typename T> struct texture_image {
nniz = wrap_periodic(iz+2, depth);
break;
case EXTENSION_CLIP:
- if (x < 0.0f || y < 0.0f || x > 1.0f || y > 1.0f) {
+ if (x < 0.0f || y < 0.0f || z < 0.0f ||
+ x > 1.0f || y > 1.0f || z > 1.0f)
+ {
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
}
/* Fall through. */
More information about the Bf-blender-cvs
mailing list