Blender V5.0
texture.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
7#include "util/defines.h"
8#include "util/transform.h"
9
11
12/* Color to use when textures are not found. */
13enum {
18};
19
20/* Interpolation types for textures
21 * CUDA also use texture space to store other objects. */
31
50
55
56/* Alpha types
57 * How to treat alpha in images. */
67
68/* Extension types for textures.
69 *
70 * Defines how the image is extrapolated past its original bounds. */
72 /* Cause the image to repeat horizontally and vertically. */
74 /* Extend by repeating edge pixels of the image. */
76 /* Clip to image size and set exterior pixels as transparent. */
78 /* Repeatedly flip the image horizontally and vertically. */
80
82};
83
85 /* Pointer, offset or texture depending on device. */
87 /* Data Type */
89 /* Interpolation and extension type. */
92 /* Dimensions. */
95 /* Transform for 3D textures. */
98};
99
unsigned int uint
unsigned long long int uint64_t
#define ccl_device_inline
#define CCL_NAMESPACE_END
uint64_t data
Definition texture.h:86
uint data_type
Definition texture.h:88
uint width
Definition texture.h:93
uint extension
Definition texture.h:91
uint use_transform_3d
Definition texture.h:96
uint height
Definition texture.h:94
uint interpolation
Definition texture.h:90
Transform transform_3d
Definition texture.h:97
ImageDataType
Definition texture.h:32
@ IMAGE_DATA_NUM_TYPES
Definition texture.h:48
@ IMAGE_DATA_TYPE_BYTE
Definition texture.h:37
@ IMAGE_DATA_TYPE_FLOAT
Definition texture.h:36
@ IMAGE_DATA_TYPE_NANOVDB_FP16
Definition texture.h:45
@ IMAGE_DATA_TYPE_FLOAT4
Definition texture.h:33
@ IMAGE_DATA_TYPE_USHORT4
Definition texture.h:39
@ IMAGE_DATA_TYPE_USHORT
Definition texture.h:40
@ IMAGE_DATA_TYPE_NANOVDB_EMPTY
Definition texture.h:46
@ IMAGE_DATA_TYPE_NANOVDB_FLOAT
Definition texture.h:41
@ IMAGE_DATA_TYPE_NANOVDB_FLOAT3
Definition texture.h:42
@ IMAGE_DATA_TYPE_HALF
Definition texture.h:38
@ IMAGE_DATA_TYPE_BYTE4
Definition texture.h:34
@ IMAGE_DATA_TYPE_HALF4
Definition texture.h:35
@ IMAGE_DATA_TYPE_NANOVDB_FLOAT4
Definition texture.h:43
@ IMAGE_DATA_TYPE_NANOVDB_FPN
Definition texture.h:44
ImageAlphaType
Definition texture.h:58
@ IMAGE_ALPHA_ASSOCIATED
Definition texture.h:60
@ IMAGE_ALPHA_CHANNEL_PACKED
Definition texture.h:61
@ IMAGE_ALPHA_NUM_TYPES
Definition texture.h:65
@ IMAGE_ALPHA_AUTO
Definition texture.h:63
@ IMAGE_ALPHA_IGNORE
Definition texture.h:62
@ IMAGE_ALPHA_UNASSOCIATED
Definition texture.h:59
InterpolationType
Definition texture.h:22
@ INTERPOLATION_LINEAR
Definition texture.h:24
@ INTERPOLATION_SMART
Definition texture.h:27
@ INTERPOLATION_NONE
Definition texture.h:23
@ INTERPOLATION_CLOSEST
Definition texture.h:25
@ INTERPOLATION_CUBIC
Definition texture.h:26
@ INTERPOLATION_NUM_TYPES
Definition texture.h:29
ExtensionType
Definition texture.h:71
@ EXTENSION_REPEAT
Definition texture.h:73
@ EXTENSION_NUM_TYPES
Definition texture.h:81
@ EXTENSION_CLIP
Definition texture.h:77
@ EXTENSION_EXTEND
Definition texture.h:75
@ EXTENSION_MIRROR
Definition texture.h:79
@ TEX_IMAGE_MISSING_G
Definition texture.h:15
@ TEX_IMAGE_MISSING_A
Definition texture.h:17
@ TEX_IMAGE_MISSING_R
Definition texture.h:14
@ TEX_IMAGE_MISSING_B
Definition texture.h:16
ccl_device_inline bool is_nanovdb_type(int type)
Definition texture.h:51
ccl_device_inline Transform transform_zero()
Definition transform.h:254