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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-07-28 14:51:10 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-28 15:14:24 +0300
commit3fba620858fa5bf44bec3124c61f6cc2e40356b0 (patch)
tree41aaddb8ad9fdd6b964a62b85129a703d626d5f8 /intern/cycles/kernel/kernel_compat_cpu.h
parent29ebb56f4d8b99ca3038c7a3d0ed794ef77ee7f9 (diff)
Cycles: Prepare for more image extension types support
Basically just replace boolean periodic flag with extension type enum in the device API.
Diffstat (limited to 'intern/cycles/kernel/kernel_compat_cpu.h')
-rw-r--r--intern/cycles/kernel/kernel_compat_cpu.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h
index a780c356a18..be8e54b3d3d 100644
--- a/intern/cycles/kernel/kernel_compat_cpu.h
+++ b/intern/cycles/kernel/kernel_compat_cpu.h
@@ -138,7 +138,7 @@ template<typename T> struct texture_image {
if(interpolation == INTERPOLATION_CLOSEST) {
frac(x*(float)width, &ix);
frac(y*(float)height, &iy);
- if(periodic) {
+ if(extension == EXTENSION_REPEAT) {
ix = wrap_periodic(ix, width);
iy = wrap_periodic(iy, height);
@@ -153,7 +153,7 @@ template<typename T> struct texture_image {
float tx = frac(x*(float)width - 0.5f, &ix);
float ty = frac(y*(float)height - 0.5f, &iy);
- if(periodic) {
+ if(extension == EXTENSION_REPEAT) {
ix = wrap_periodic(ix, width);
iy = wrap_periodic(iy, height);
@@ -180,7 +180,7 @@ template<typename T> struct texture_image {
const float tx = frac(x*(float)width - 0.5f, &ix);
const float ty = frac(y*(float)height - 0.5f, &iy);
int pix, piy, nnix, nniy;
- if(periodic) {
+ if(extension == EXTENSION_REPEAT) {
ix = wrap_periodic(ix, width);
iy = wrap_periodic(iy, height);
@@ -251,7 +251,7 @@ template<typename T> struct texture_image {
frac(y*(float)height, &iy);
frac(z*(float)depth, &iz);
- if(periodic) {
+ if(extension == EXTENSION_REPEAT) {
ix = wrap_periodic(ix, width);
iy = wrap_periodic(iy, height);
iz = wrap_periodic(iz, depth);
@@ -269,7 +269,7 @@ template<typename T> struct texture_image {
float ty = frac(y*(float)height - 0.5f, &iy);
float tz = frac(z*(float)depth - 0.5f, &iz);
- if(periodic) {
+ if(extension == EXTENSION_REPEAT) {
ix = wrap_periodic(ix, width);
iy = wrap_periodic(iy, height);
iz = wrap_periodic(iz, depth);
@@ -309,7 +309,7 @@ template<typename T> struct texture_image {
const float tz = frac(z*(float)depth - 0.5f, &iz);
int pix, piy, piz, nnix, nniy, nniz;
- if(periodic) {
+ if(extension == EXTENSION_REPEAT) {
ix = wrap_periodic(ix, width);
iy = wrap_periodic(iy, height);
iz = wrap_periodic(iz, depth);
@@ -392,7 +392,7 @@ template<typename T> struct texture_image {
T *data;
int interpolation;
- bool periodic;
+ ExtensionType extension;
int width, height, depth;
#undef SET_CUBIC_SPLINE_WEIGHTS
};