17 #ifndef __KERNEL_CPU_IMAGE_H__
18 #define __KERNEL_CPU_IMAGE_H__
21 # define NANOVDB_USE_INTRINSICS
22 # include <nanovdb/NanoVDB.h>
23 # include <nanovdb/util/SampleFromVoxels.h>
32 #define SET_CUBIC_SPLINE_WEIGHTS(u, t) \
34 u[0] = (((-1.0f / 6.0f) * t + 0.5f) * t - 0.5f) * t + (1.0f / 6.0f); \
35 u[1] = ((0.5f * t - 1.0f) * t) * t + (2.0f / 3.0f); \
36 u[2] = ((-0.5f * t + 0.5f) * t + 0.5f) * t + (1.0f / 6.0f); \
37 u[3] = (1.0f / 6.0f) * t * t * t; \
57 float f = 1.0f / 255.0f;
63 float f =
r * (1.0f / 255.0f);
87 float f =
r * (1.0f / 65535.0f);
93 float f = 1.0f / 65535.0f;
130 ix = wrap_periodic(ix,
width);
131 iy = wrap_periodic(iy,
height);
134 if (
x < 0.0f || y < 0.0f || x > 1.0f ||
y > 1.0f) {
139 ix = wrap_clamp(ix,
width);
140 iy = wrap_clamp(iy,
height);
154 int ix, iy, nix, niy;
155 const float tx =
frac(
x * (
float)
width - 0.5f, &ix);
156 const float ty =
frac(
y * (
float)
height - 0.5f, &iy);
159 ix = wrap_periodic(ix,
width);
160 iy = wrap_periodic(iy,
height);
161 nix = wrap_periodic(ix + 1,
width);
162 niy = wrap_periodic(iy + 1,
height);
169 nix = wrap_clamp(ix + 1,
width);
170 niy = wrap_clamp(iy + 1,
height);
171 ix = wrap_clamp(ix,
width);
172 iy = wrap_clamp(iy,
height);
189 int ix, iy, nix, niy;
190 const float tx =
frac(
x * (
float)
width - 0.5f, &ix);
191 const float ty =
frac(
y * (
float)
height - 0.5f, &iy);
192 int pix, piy, nnix, nniy;
195 ix = wrap_periodic(ix,
width);
196 iy = wrap_periodic(iy,
height);
197 pix = wrap_periodic(ix - 1,
width);
198 piy = wrap_periodic(iy - 1,
height);
199 nix = wrap_periodic(ix + 1,
width);
200 niy = wrap_periodic(iy + 1,
height);
201 nnix = wrap_periodic(ix + 2,
width);
202 nniy = wrap_periodic(iy + 2,
height);
213 pix = wrap_clamp(ix - 1,
width);
214 piy = wrap_clamp(iy - 1,
height);
215 nix = wrap_clamp(ix + 1,
width);
216 niy = wrap_clamp(iy + 1,
height);
217 nnix = wrap_clamp(ix + 2,
width);
218 nniy = wrap_clamp(iy + 2,
height);
219 ix = wrap_clamp(ix,
width);
220 iy = wrap_clamp(iy,
height);
226 const int xc[4] = {pix, ix, nix, nnix};
227 const int yc[4] = {piy, iy, niy, nniy};
232 #define DATA(x, y) (read(data, xc[x], yc[y], width, height))
235 (u[0] * DATA(0, col) + u[1] * DATA(1, col) + u[2] * DATA(2, col) + u[3] * DATA(3, col)))
253 return interp_closest(info,
x,
y);
255 return interp_linear(info,
x,
y);
257 return interp_cubic(info,
x,
y);
270 int depth = info.
depth;
275 frac(
z * (
float)depth, &iz);
279 ix = wrap_periodic(ix,
width);
280 iy = wrap_periodic(iy,
height);
281 iz = wrap_periodic(iz, depth);
284 if (
x < 0.0f ||
y < 0.0f || z < 0.0f || x > 1.0f ||
y > 1.0f ||
z > 1.0f) {
289 ix = wrap_clamp(ix,
width);
290 iy = wrap_clamp(iy,
height);
291 iz = wrap_clamp(iz, depth);
309 int depth = info.
depth;
313 float tx =
frac(
x * (
float)
width - 0.5f, &ix);
315 float tz =
frac(
z * (
float)depth - 0.5f, &iz);
319 ix = wrap_periodic(ix,
width);
320 iy = wrap_periodic(iy,
height);
321 iz = wrap_periodic(iz, depth);
323 nix = wrap_periodic(ix + 1,
width);
324 niy = wrap_periodic(iy + 1,
height);
325 niz = wrap_periodic(iz + 1, depth);
328 if (
x < 0.0f ||
y < 0.0f || z < 0.0f || x > 1.0f ||
y > 1.0f ||
z > 1.0f) {
333 nix = wrap_clamp(ix + 1,
width);
334 niy = wrap_clamp(iy + 1,
height);
335 niz = wrap_clamp(iz + 1, depth);
337 ix = wrap_clamp(ix,
width);
338 iy = wrap_clamp(iy,
height);
339 iz = wrap_clamp(iz, depth);
349 r = (1.0f - tz) * (1.0f - ty) * (1.0f - tx) *
369 #if defined(__GNUC__) || defined(__clang__)
379 int depth = info.
depth;
383 const float tx =
frac(
x * (
float)
width - 0.5f, &ix);
384 const float ty =
frac(
y * (
float)
height - 0.5f, &iy);
385 const float tz =
frac(
z * (
float)depth - 0.5f, &iz);
386 int pix, piy, piz, nnix, nniy, nniz;
390 ix = wrap_periodic(ix,
width);
391 iy = wrap_periodic(iy,
height);
392 iz = wrap_periodic(iz, depth);
394 pix = wrap_periodic(ix - 1,
width);
395 piy = wrap_periodic(iy - 1,
height);
396 piz = wrap_periodic(iz - 1, depth);
398 nix = wrap_periodic(ix + 1,
width);
399 niy = wrap_periodic(iy + 1,
height);
400 niz = wrap_periodic(iz + 1, depth);
402 nnix = wrap_periodic(ix + 2,
width);
403 nniy = wrap_periodic(iy + 2,
height);
404 nniz = wrap_periodic(iz + 2, depth);
407 if (
x < 0.0f ||
y < 0.0f || z < 0.0f || x > 1.0f ||
y > 1.0f ||
z > 1.0f) {
412 pix = wrap_clamp(ix - 1,
width);
413 piy = wrap_clamp(iy - 1,
height);
414 piz = wrap_clamp(iz - 1, depth);
416 nix = wrap_clamp(ix + 1,
width);
417 niy = wrap_clamp(iy + 1,
height);
418 niz = wrap_clamp(iz + 1, depth);
420 nnix = wrap_clamp(ix + 2,
width);
421 nniy = wrap_clamp(iy + 2,
height);
422 nniz = wrap_clamp(iz + 2, depth);
424 ix = wrap_clamp(ix,
width);
425 iy = wrap_clamp(iy,
height);
426 iz = wrap_clamp(iz, depth);
433 const int xc[4] = {pix, ix, nix, nnix};
437 float u[4],
v[4],
w[4];
442 #define DATA(x, y, z) (read(data[xc[x] + yc[y] + zc[z]]))
443 #define COL_TERM(col, row) \
444 (v[col] * (u[0] * DATA(0, col, row) + u[1] * DATA(1, col, row) + u[2] * DATA(2, col, row) + \
445 u[3] * DATA(3, col, row)))
446 #define ROW_TERM(row) \
447 (w[row] * (COL_TERM(0, row) + COL_TERM(1, row) + COL_TERM(2, row) + COL_TERM(3, row)))
470 return interp_3d_closest(info,
x,
y,
z);
472 return interp_3d_linear(info,
x,
y,
z);
474 return interp_3d_cubic(info,
x,
y,
z);
480 template<
typename T>
struct NanoVDBInterpolator {
482 typedef typename nanovdb::NanoGrid<T>::AccessorType AccessorType;
500 return read(nanovdb::SampleFromVoxels<AccessorType, 0, false>(acc)(xyz));
509 return read(nanovdb::SampleFromVoxels<AccessorType, 1, false>(acc)(xyz));
512 # if defined(__GNUC__) || defined(__clang__)
518 interp_3d_cubic(
const AccessorType &acc,
float x,
float y,
float z)
523 int nnix, nniy, nniz;
525 const float tx =
frac(
x - 0.5f, &ix);
526 const float ty =
frac(
y - 0.5f, &iy);
527 const float tz =
frac(
z - 0.5f, &iz);
538 const int xc[4] = {pix, ix, nix, nnix};
539 const int yc[4] = {piy, iy, niy, nniy};
540 const int zc[4] = {piz, iz, niz, nniz};
541 float u[4],
v[4],
w[4];
546 # define DATA(x, y, z) (read(acc.getValue(nanovdb::Coord(xc[x], yc[y], zc[z]))))
547 # define COL_TERM(col, row) \
548 (v[col] * (u[0] * DATA(0, col, row) + u[1] * DATA(1, col, row) + u[2] * DATA(2, col, row) + \
549 u[3] * DATA(3, col, row)))
550 # define ROW_TERM(row) \
551 (w[row] * (COL_TERM(0, row) + COL_TERM(1, row) + COL_TERM(2, row) + COL_TERM(3, row)))
568 using namespace nanovdb;
570 NanoGrid<T> *
const grid = (NanoGrid<T> *)info.
data;
571 AccessorType acc = grid->getAccessor();
575 return interp_3d_closest(acc,
x,
y,
z);
577 return interp_3d_linear(acc,
x,
y,
z);
579 return interp_3d_cubic(acc,
x,
y,
z);
585 #undef SET_CUBIC_SPLINE_WEIGHTS
645 return NanoVDBInterpolator<float>::interp_3d(info,
P.x,
P.y,
P.z,
interp);
647 return NanoVDBInterpolator<nanovdb::Vec3f>::interp_3d(info,
P.x,
P.y,
P.z,
interp);
typedef float(TangentPoint)[2]
_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 GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_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 width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_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
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
#define kernel_assert(cond)
#define kernel_tex_fetch(tex, index)
#define ccl_device_inline
#define CCL_NAMESPACE_END
#define make_float4(x, y, z, w)
#define SET_CUBIC_SPLINE_WEIGHTS(u, t)
ccl_device float4 kernel_tex_image_interp(KernelGlobals *kg, int id, float x, float y)
ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float3 P, InterpolationType interp)
ccl_device_inline float frac(float x, int *ix)
static ccl_always_inline float4 interp_closest(const TextureInfo &info, float x, float y)
static ccl_never_inline float4 interp_3d_cubic(const TextureInfo &info, float x, float y, float z)
static ccl_always_inline float4 interp_3d(const TextureInfo &info, float x, float y, float z, InterpolationType interp)
static ccl_always_inline float4 interp_cubic(const TextureInfo &info, float x, float y)
static ccl_always_inline float4 read(float r)
static ccl_always_inline int wrap_clamp(int x, int width)
static ccl_always_inline float4 interp_3d_closest(const TextureInfo &info, float x, float y, float z)
static ccl_always_inline float4 read(half4 r)
static ccl_always_inline float4 read(const T *data, int x, int y, int width, int height)
static ccl_always_inline float4 read(half r)
static ccl_always_inline float4 interp_linear(const TextureInfo &info, float x, float y)
static ccl_always_inline float4 read(uchar4 r)
static ccl_always_inline float4 read(uchar r)
static ccl_always_inline int wrap_periodic(int x, int width)
static ccl_always_inline float4 interp(const TextureInfo &info, float x, float y)
static ccl_always_inline float4 read(float4 r)
static ccl_always_inline float4 interp_3d_linear(const TextureInfo &info, float x, float y, float z)
static ccl_always_inline float4 read(uint16_t r)
static ccl_always_inline float4 read(ushort4 r)
#define ccl_always_inline
ccl_device_inline float4 half4_to_float4(half4 h)
ccl_device_inline float half_to_float(half h)
ccl_device_inline int float_to_int(float f)
ccl_device_inline int clamp(int a, int mn, int mx)
ccl_device_inline float2 interp(const float2 &a, const float2 &b, float t)
@ IMAGE_DATA_TYPE_USHORT4
@ IMAGE_DATA_TYPE_NANOVDB_FLOAT
@ IMAGE_DATA_TYPE_NANOVDB_FLOAT3
#define TEX_IMAGE_MISSING_R
#define TEX_IMAGE_MISSING_B
#define TEX_IMAGE_MISSING_A
#define TEX_IMAGE_MISSING_G