Blender V4.3
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 */
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#ifdef __cplusplus
21extern "C" {
22#endif
23
24/* `texture_procedural.cc` */
25
31bool RE_texture_evaluate(const struct MTex *mtex,
32 const float vec[3],
33 int thread,
34 struct ImagePool *pool,
35 bool skip_load_image,
36 bool texnode_preview,
37 /* Return arguments. */
38 float *r_intensity,
39 float r_rgba[4]) ATTR_NONNULL(1, 2, 7, 8);
40
48float texture_value_blend(float tex, float out, float fact, float facg, int blendtype);
49
50void RE_texture_rng_init(void);
51void RE_texture_rng_exit(void);
52
53/* `texture_image.cc` */
54
55void ibuf_sample(struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float result[4]);
56
57/* `texture_pointdensity.cc` */
58
59struct PointDensity;
60
61void RE_point_density_cache(struct Depsgraph *depsgraph, struct PointDensity *pd);
62
63void RE_point_density_minmax(struct Depsgraph *depsgraph,
64 struct PointDensity *pd,
65 float r_min[3],
66 float r_max[3]);
67
72void RE_point_density_sample(struct Depsgraph *depsgraph,
73 struct PointDensity *pd,
74 int resolution,
75 float *values);
76
77void RE_point_density_free(struct PointDensity *pd);
78
80
81/* `texture_procedural.cc` */
82
86typedef struct TexResult {
87 float tin;
88 float trgba[4];
89 /* Is actually a boolean: When true -> use alpha, false -> set alpha to 1.0. */
90 int talpha;
92
93/* This one uses nodes. */
94
102int multitex_ext(struct Tex *tex,
103 const float texvec[3],
104 float dxt[3],
105 float dyt[3],
106 int osatex,
107 struct TexResult *texres,
108 short thread,
109 struct ImagePool *pool,
110 bool scene_color_manage,
111 bool skip_load_image);
112
119int multitex_ext_safe(struct Tex *tex,
120 const float texvec[3],
121 struct TexResult *texres,
122 struct ImagePool *pool,
123 bool scene_color_manage,
124 bool skip_load_image);
125
133 const float texvec[3],
134 float dxt[3],
135 float dyt[3],
136 int osatex,
137 struct TexResult *texres,
138 short thread,
139 short which_output,
140 const struct MTex *mtex,
141 struct ImagePool *pool);
142
143#ifdef __cplusplus
144}
145#endif
#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)
struct TexResult TexResult
const Depsgraph * depsgraph
float tin
Definition RE_texture.h:87
float trgba[4]
Definition RE_texture.h:88