Blender V5.0
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_procedural.cc` */
54
58struct TexResult {
59 float tin;
60 float trgba[4];
61 /* Is actually a boolean: When true -> use alpha, false -> set alpha to 1.0. */
62 int talpha;
63};
64
65/* This one uses nodes. */
66
74int multitex_ext(struct Tex *tex,
75 const float texvec[3],
76 struct TexResult *texres,
77 short thread,
78 struct ImagePool *pool,
79 bool scene_color_manage,
80 bool skip_load_image);
81
88int multitex_ext_safe(struct Tex *tex,
89 const float texvec[3],
90 struct TexResult *texres,
91 struct ImagePool *pool,
92 bool scene_color_manage,
93 bool skip_load_image);
94
101int multitex_nodes(struct Tex *tex,
102 const float texvec[3],
103 struct TexResult *texres,
104 short thread,
105 short which_output,
106 const struct MTex *mtex,
107 struct ImagePool *pool);
#define ATTR_NONNULL(...)
int multitex_ext(struct Tex *tex, const float texvec[3], struct TexResult *texres, short thread, struct ImagePool *pool, bool scene_color_manage, bool skip_load_image)
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)
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])
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)
int multitex_nodes(struct Tex *tex, const float texvec[3], struct TexResult *texres, short thread, short which_output, const struct MTex *mtex, struct ImagePool *pool)
#define out
float tin
Definition RE_texture.h:59
float trgba[4]
Definition RE_texture.h:60