Blender  V2.93
kernel_cuda_image.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifdef WITH_NANOVDB
18 # define NDEBUG /* Disable "assert" in device code */
19 # define NANOVDB_USE_INTRINSICS
20 # include "nanovdb/NanoVDB.h"
21 # include "nanovdb/util/SampleFromVoxels.h"
22 #endif
23 
24 /* w0, w1, w2, and w3 are the four cubic B-spline basis functions. */
25 ccl_device float cubic_w0(float a)
26 {
27  return (1.0f / 6.0f) * (a * (a * (-a + 3.0f) - 3.0f) + 1.0f);
28 }
29 ccl_device float cubic_w1(float a)
30 {
31  return (1.0f / 6.0f) * (a * a * (3.0f * a - 6.0f) + 4.0f);
32 }
33 ccl_device float cubic_w2(float a)
34 {
35  return (1.0f / 6.0f) * (a * (a * (-3.0f * a + 3.0f) + 3.0f) + 1.0f);
36 }
37 ccl_device float cubic_w3(float a)
38 {
39  return (1.0f / 6.0f) * (a * a * a);
40 }
41 
42 /* g0 and g1 are the two amplitude functions. */
43 ccl_device float cubic_g0(float a)
44 {
45  return cubic_w0(a) + cubic_w1(a);
46 }
47 ccl_device float cubic_g1(float a)
48 {
49  return cubic_w2(a) + cubic_w3(a);
50 }
51 
52 /* h0 and h1 are the two offset functions */
53 ccl_device float cubic_h0(float a)
54 {
55  return (cubic_w1(a) / cubic_g0(a)) - 1.0f;
56 }
57 ccl_device float cubic_h1(float a)
58 {
59  return (cubic_w3(a) / cubic_g1(a)) + 1.0f;
60 }
61 
62 /* Fast bicubic texture lookup using 4 bilinear lookups, adapted from CUDA samples. */
63 template<typename T>
65 {
67 
68  x = (x * info.width) - 0.5f;
69  y = (y * info.height) - 0.5f;
70 
71  float px = floorf(x);
72  float py = floorf(y);
73  float fx = x - px;
74  float fy = y - py;
75 
76  float g0x = cubic_g0(fx);
77  float g1x = cubic_g1(fx);
78  /* Note +0.5 offset to compensate for CUDA linear filtering convention. */
79  float x0 = (px + cubic_h0(fx) + 0.5f) / info.width;
80  float x1 = (px + cubic_h1(fx) + 0.5f) / info.width;
81  float y0 = (py + cubic_h0(fy) + 0.5f) / info.height;
82  float y1 = (py + cubic_h1(fy) + 0.5f) / info.height;
83 
84  return cubic_g0(fy) * (g0x * tex2D<T>(tex, x0, y0) + g1x * tex2D<T>(tex, x1, y0)) +
85  cubic_g1(fy) * (g0x * tex2D<T>(tex, x0, y1) + g1x * tex2D<T>(tex, x1, y1));
86 }
87 
88 /* Fast tricubic texture lookup using 8 trilinear lookups. */
89 template<typename T>
90 ccl_device T kernel_tex_image_interp_tricubic(const TextureInfo &info, float x, float y, float z)
91 {
93 
94  x = (x * info.width) - 0.5f;
95  y = (y * info.height) - 0.5f;
96  z = (z * info.depth) - 0.5f;
97 
98  float px = floorf(x);
99  float py = floorf(y);
100  float pz = floorf(z);
101  float fx = x - px;
102  float fy = y - py;
103  float fz = z - pz;
104 
105  float g0x = cubic_g0(fx);
106  float g1x = cubic_g1(fx);
107  float g0y = cubic_g0(fy);
108  float g1y = cubic_g1(fy);
109  float g0z = cubic_g0(fz);
110  float g1z = cubic_g1(fz);
111 
112  /* Note +0.5 offset to compensate for CUDA linear filtering convention. */
113  float x0 = (px + cubic_h0(fx) + 0.5f) / info.width;
114  float x1 = (px + cubic_h1(fx) + 0.5f) / info.width;
115  float y0 = (py + cubic_h0(fy) + 0.5f) / info.height;
116  float y1 = (py + cubic_h1(fy) + 0.5f) / info.height;
117  float z0 = (pz + cubic_h0(fz) + 0.5f) / info.depth;
118  float z1 = (pz + cubic_h1(fz) + 0.5f) / info.depth;
119 
120  return g0z * (g0y * (g0x * tex3D<T>(tex, x0, y0, z0) + g1x * tex3D<T>(tex, x1, y0, z0)) +
121  g1y * (g0x * tex3D<T>(tex, x0, y1, z0) + g1x * tex3D<T>(tex, x1, y1, z0))) +
122  g1z * (g0y * (g0x * tex3D<T>(tex, x0, y0, z1) + g1x * tex3D<T>(tex, x1, y0, z1)) +
123  g1y * (g0x * tex3D<T>(tex, x0, y1, z1) + g1x * tex3D<T>(tex, x1, y1, z1)));
124 }
125 
126 #ifdef WITH_NANOVDB
127 template<typename T, typename S>
128 ccl_device T kernel_tex_image_interp_tricubic_nanovdb(S &s, float x, float y, float z)
129 {
130  float px = floorf(x);
131  float py = floorf(y);
132  float pz = floorf(z);
133  float fx = x - px;
134  float fy = y - py;
135  float fz = z - pz;
136 
137  float g0x = cubic_g0(fx);
138  float g1x = cubic_g1(fx);
139  float g0y = cubic_g0(fy);
140  float g1y = cubic_g1(fy);
141  float g0z = cubic_g0(fz);
142  float g1z = cubic_g1(fz);
143 
144  float x0 = px + cubic_h0(fx);
145  float x1 = px + cubic_h1(fx);
146  float y0 = py + cubic_h0(fy);
147  float y1 = py + cubic_h1(fy);
148  float z0 = pz + cubic_h0(fz);
149  float z1 = pz + cubic_h1(fz);
150 
151  using namespace nanovdb;
152 
153  return g0z * (g0y * (g0x * s(Vec3f(x0, y0, z0)) + g1x * s(Vec3f(x1, y0, z0))) +
154  g1y * (g0x * s(Vec3f(x0, y1, z0)) + g1x * s(Vec3f(x1, y1, z0)))) +
155  g1z * (g0y * (g0x * s(Vec3f(x0, y0, z1)) + g1x * s(Vec3f(x1, y0, z1))) +
156  g1y * (g0x * s(Vec3f(x0, y1, z1)) + g1x * s(Vec3f(x1, y1, z1))));
157 }
158 
159 template<typename T>
160 ccl_device_inline T kernel_tex_image_interp_nanovdb(
161  const TextureInfo &info, float x, float y, float z, uint interpolation)
162 {
163  using namespace nanovdb;
164 
165  NanoGrid<T> *const grid = (NanoGrid<T> *)info.data;
166  typedef typename nanovdb::NanoGrid<T>::AccessorType AccessorType;
167  AccessorType acc = grid->getAccessor();
168 
169  switch (interpolation) {
171  return SampleFromVoxels<AccessorType, 0, false>(acc)(Vec3f(x, y, z));
173  return SampleFromVoxels<AccessorType, 1, false>(acc)(Vec3f(x - 0.5f, y - 0.5f, z - 0.5f));
174  default:
175  SampleFromVoxels<AccessorType, 1, false> s(acc);
176  return kernel_tex_image_interp_tricubic_nanovdb<T>(s, x - 0.5f, y - 0.5f, z - 0.5f);
177  }
178 }
179 #endif
180 
181 ccl_device float4 kernel_tex_image_interp(KernelGlobals *kg, int id, float x, float y)
182 {
183  const TextureInfo &info = kernel_tex_fetch(__texture_info, id);
184 
185  /* float4, byte4, ushort4 and half4 */
186  const int texture_type = info.data_type;
187  if (texture_type == IMAGE_DATA_TYPE_FLOAT4 || texture_type == IMAGE_DATA_TYPE_BYTE4 ||
188  texture_type == IMAGE_DATA_TYPE_HALF4 || texture_type == IMAGE_DATA_TYPE_USHORT4) {
189  if (info.interpolation == INTERPOLATION_CUBIC) {
190  return kernel_tex_image_interp_bicubic<float4>(info, x, y);
191  }
192  else {
194  return tex2D<float4>(tex, x, y);
195  }
196  }
197  /* float, byte and half */
198  else {
199  float f;
200 
201  if (info.interpolation == INTERPOLATION_CUBIC) {
202  f = kernel_tex_image_interp_bicubic<float>(info, x, y);
203  }
204  else {
206  f = tex2D<float>(tex, x, y);
207  }
208 
209  return make_float4(f, f, f, 1.0f);
210  }
211 }
212 
214  int id,
215  float3 P,
217 {
218  const TextureInfo &info = kernel_tex_fetch(__texture_info, id);
219 
220  if (info.use_transform_3d) {
221  P = transform_point(&info.transform_3d, P);
222  }
223 
224  const float x = P.x;
225  const float y = P.y;
226  const float z = P.z;
227 
228  uint interpolation = (interp == INTERPOLATION_NONE) ? info.interpolation : interp;
229  const int texture_type = info.data_type;
230 
231 #ifdef WITH_NANOVDB
232  if (texture_type == IMAGE_DATA_TYPE_NANOVDB_FLOAT) {
233  float f = kernel_tex_image_interp_nanovdb<float>(info, x, y, z, interpolation);
234  return make_float4(f, f, f, 1.0f);
235  }
236  if (texture_type == IMAGE_DATA_TYPE_NANOVDB_FLOAT3) {
237  nanovdb::Vec3f f = kernel_tex_image_interp_nanovdb<nanovdb::Vec3f>(
238  info, x, y, z, interpolation);
239  return make_float4(f[0], f[1], f[2], 1.0f);
240  }
241 #endif
242  if (texture_type == IMAGE_DATA_TYPE_FLOAT4 || texture_type == IMAGE_DATA_TYPE_BYTE4 ||
243  texture_type == IMAGE_DATA_TYPE_HALF4 || texture_type == IMAGE_DATA_TYPE_USHORT4) {
244  if (interpolation == INTERPOLATION_CUBIC) {
245  return kernel_tex_image_interp_tricubic<float4>(info, x, y, z);
246  }
247  else {
249  return tex3D<float4>(tex, x, y, z);
250  }
251  }
252  else {
253  float f;
254 
255  if (interpolation == INTERPOLATION_CUBIC) {
256  f = kernel_tex_image_interp_tricubic<float>(info, x, y, z);
257  }
258  else {
260  f = tex3D<float>(tex, x, y, z);
261  }
262 
263  return make_float4(f, f, f, 1.0f);
264  }
265 }
unsigned int uint
Definition: BLI_sys_types.h:83
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
struct Vec3f Vec3f
#define kernel_tex_fetch(tex, index)
#define ccl_device
#define ccl_device_inline
unsigned long long CUtexObject
#define floorf(x)
#define make_float4(x, y, z, w)
ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float3 P, InterpolationType interp)
ccl_device float cubic_w2(float a)
ccl_device float cubic_h0(float a)
ccl_device float cubic_g0(float a)
ccl_device float cubic_w3(float a)
ccl_device float cubic_w0(float a)
ccl_device float cubic_w1(float a)
ccl_device T kernel_tex_image_interp_bicubic(const TextureInfo &info, float x, float y)
ccl_device float cubic_g1(float a)
ccl_device float cubic_h1(float a)
ccl_device T kernel_tex_image_interp_tricubic(const TextureInfo &info, float x, float y, float z)
ccl_device float4 kernel_tex_image_interp(KernelGlobals *kg, int id, float x, float y)
static float P(float k)
Definition: math_interp.c:41
#define T
static unsigned a[3]
Definition: RandGen.cpp:92
uint64_t data
Definition: util_texture.h:97
uint data_type
Definition: util_texture.h:99
uint use_transform_3d
Definition: util_texture.h:107
uint interpolation
Definition: util_texture.h:103
Transform transform_3d
Definition: util_texture.h:108
ccl_device_inline float2 interp(const float2 &a, const float2 &b, float t)
@ IMAGE_DATA_TYPE_FLOAT4
Definition: util_texture.h:52
@ IMAGE_DATA_TYPE_USHORT4
Definition: util_texture.h:58
@ IMAGE_DATA_TYPE_NANOVDB_FLOAT
Definition: util_texture.h:60
@ IMAGE_DATA_TYPE_NANOVDB_FLOAT3
Definition: util_texture.h:61
@ IMAGE_DATA_TYPE_BYTE4
Definition: util_texture.h:53
@ IMAGE_DATA_TYPE_HALF4
Definition: util_texture.h:54
InterpolationType
Definition: util_texture.h:38
@ INTERPOLATION_LINEAR
Definition: util_texture.h:40
@ INTERPOLATION_NONE
Definition: util_texture.h:39
@ INTERPOLATION_CLOSEST
Definition: util_texture.h:41
@ INTERPOLATION_CUBIC
Definition: util_texture.h:42
ccl_device_inline float3 transform_point(const Transform *t, const float3 a)