Cycles: Cleanup, style

This commit is contained in:
Sergey Sharybin
2016-10-24 12:26:12 +02:00
parent 3f29259676
commit 48997d2e40
16 changed files with 53 additions and 41 deletions

View File

@@ -162,16 +162,18 @@ ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float x,
svm_image_texture_frac(y*height, &iy);
svm_image_texture_frac(z*depth, &iz);
if (extension == EXTENSION_REPEAT) {
if(extension == EXTENSION_REPEAT) {
ix = svm_image_texture_wrap_periodic(ix, width);
iy = svm_image_texture_wrap_periodic(iy, height);
iz = svm_image_texture_wrap_periodic(iz, depth);
}
else {
if (extension == EXTENSION_CLIP) {
if(extension == EXTENSION_CLIP) {
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. */
/* EXTENSION_EXTEND */
@@ -196,10 +198,12 @@ ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float x,
niz = svm_image_texture_wrap_periodic(iz+1, depth);
}
else {
if (extension == EXTENSION_CLIP)
if(extension == EXTENSION_CLIP)
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. */
/* EXTENSION_EXTEND */
nix = svm_image_texture_wrap_clamp(ix+1, width);