Blender V4.5
RE_texture.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2006 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
9
10#pragma once
11
12#include "BLI_compiler_attrs.h"
13
14/* called by meshtools */
15struct Depsgraph;
16struct ImagePool;
17struct MTex;
18struct Tex;
19
20/* `texture_procedural.cc` */
21
27bool RE_texture_evaluate(const struct MTex *mtex,
28 const float vec[3],
29 int thread,
30 struct ImagePool *pool,
31 bool skip_load_image,
32 bool texnode_preview,
33 /* Return arguments. */
34 float *r_intensity,
35 float r_rgba[4]) ATTR_NONNULL(1, 2, 7, 8);
36
44float texture_value_blend(float tex, float out, float fact, float facg, int blendtype);
45
46void RE_texture_rng_init(void);
47void RE_texture_rng_exit(void);
48
49/* `texture_image.cc` */
50
51void ibuf_sample(struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float result[4]);
52
53/* `texture_pointdensity.cc` */
54
55struct PointDensity;
56
57void RE_point_density_cache(struct Depsgraph *depsgraph, struct PointDensity *pd);
58
59void RE_point_density_minmax(struct Depsgraph *depsgraph,
60 struct PointDensity *pd,
61 float r_min[3],
62 float r_max[3]);
63
68void RE_point_density_sample(struct Depsgraph *depsgraph,
69 struct PointDensity *pd,
70 int resolution,
71 float *values);
72
73void RE_point_density_free(struct PointDensity *pd);
74
76
77/* `texture_procedural.cc` */
78
82struct TexResult {
83 float tin;
84 float trgba[4];
85 /* Is actually a boolean: When true -> use alpha, false -> set alpha to 1.0. */
86 int talpha;
87};
88
89/* This one uses nodes. */
90
98int multitex_ext(struct Tex *tex,
99 const float texvec[3],
100 float dxt[3],
101 float dyt[3],
102 int osatex,
103 struct TexResult *texres,
104 short thread,
105 struct ImagePool *pool,
106 bool scene_color_manage,
107 bool skip_load_image);
108
115int multitex_ext_safe(struct Tex *tex,
116 const float texvec[3],
117 struct TexResult *texres,
118 struct ImagePool *pool,
119 bool scene_color_manage,
120 bool skip_load_image);
121
128int multitex_nodes(struct Tex *tex,
129 const float texvec[3],
130 float dxt[3],
131 float dyt[3],
132 int osatex,
133 struct TexResult *texres,
134 short thread,
135 short which_output,
136 const struct MTex *mtex,
137 struct ImagePool *pool);
#define ATTR_NONNULL(...)
int multitex_ext(struct Tex *tex, const float texvec[3], float dxt[3], float dyt[3], int osatex, struct TexResult *texres, short thread, struct ImagePool *pool, bool scene_color_manage, bool skip_load_image)
void RE_point_density_sample(struct Depsgraph *depsgraph, struct PointDensity *pd, int resolution, float *values)
void RE_point_density_fix_linking(void)
void RE_point_density_cache(struct Depsgraph *depsgraph, struct PointDensity *pd)
bool RE_texture_evaluate(const struct MTex *mtex, const float vec[3], int thread, struct ImagePool *pool, bool skip_load_image, bool texnode_preview, float *r_intensity, float r_rgba[4]) ATTR_NONNULL(1
void RE_texture_rng_init(void)
void RE_point_density_minmax(struct Depsgraph *depsgraph, struct PointDensity *pd, float r_min[3], float r_max[3])
bool float texture_value_blend(float tex, float out, float fact, float facg, int blendtype)
void ibuf_sample(struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float result[4])
int multitex_nodes(struct Tex *tex, const float texvec[3], float dxt[3], float dyt[3], int osatex, struct TexResult *texres, short thread, short which_output, const struct MTex *mtex, struct ImagePool *pool)
void RE_point_density_free(struct PointDensity *pd)
void RE_texture_rng_exit(void)
int multitex_ext_safe(struct Tex *tex, const float texvec[3], struct TexResult *texres, struct ImagePool *pool, bool scene_color_manage, bool skip_load_image)
BPy_StructRNA * depsgraph
#define out
float tin
Definition RE_texture.h:83
float trgba[4]
Definition RE_texture.h:84