forked from bartvdbraak/blender
Cycles: Fix missing z-coordinate check in volume sampling
This commit is contained in:
parent
1a65289a12
commit
d784568805
@ -279,7 +279,9 @@ template<typename T> struct texture_image {
|
|||||||
iz = wrap_periodic(iz, depth);
|
iz = wrap_periodic(iz, depth);
|
||||||
break;
|
break;
|
||||||
case EXTENSION_CLIP:
|
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);
|
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
@ -308,7 +310,9 @@ template<typename T> struct texture_image {
|
|||||||
niz = wrap_periodic(iz+1, depth);
|
niz = wrap_periodic(iz+1, depth);
|
||||||
break;
|
break;
|
||||||
case EXTENSION_CLIP:
|
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);
|
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
@ -363,7 +367,9 @@ template<typename T> struct texture_image {
|
|||||||
nniz = wrap_periodic(iz+2, depth);
|
nniz = wrap_periodic(iz+2, depth);
|
||||||
break;
|
break;
|
||||||
case EXTENSION_CLIP:
|
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);
|
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
|
Loading…
Reference in New Issue
Block a user