Blender  V3.3
RE_texture.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2006 Blender Foundation. All rights reserved. */
9 #pragma once
10 
11 #include "BLI_compiler_attrs.h"
12 
13 /* called by meshtools */
14 struct Depsgraph;
15 struct ImagePool;
16 struct MTex;
17 struct Tex;
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /* texture_procedural.c */
24 
30 bool RE_texture_evaluate(const struct MTex *mtex,
31  const float vec[3],
32  int thread,
33  struct ImagePool *pool,
34  bool skip_load_image,
35  bool texnode_preview,
36  /* Return arguments. */
37  float *r_intensity,
38  float r_rgba[4]) ATTR_NONNULL(1, 2, 7, 8);
39 
47 float texture_value_blend(float tex, float out, float fact, float facg, int blendtype);
48 
49 void RE_texture_rng_init(void);
50 void RE_texture_rng_exit(void);
51 
52 /* texture_image.c */
53 
54 void ibuf_sample(struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float result[4]);
55 
56 /* texture_pointdensity.c */
57 
58 struct PointDensity;
59 
60 void RE_point_density_cache(struct Depsgraph *depsgraph, struct PointDensity *pd);
61 
63  struct PointDensity *pd,
64  float r_min[3],
65  float r_max[3]);
66 
72  struct PointDensity *pd,
73  int resolution,
74  float *values);
75 
76 void RE_point_density_free(struct PointDensity *pd);
77 
79 
80 /* texture_procedural.c */
81 
85 typedef struct TexResult {
86  float tin;
87  float trgba[4];
88  /* Is actually a boolean: When true -> use alpha, false -> set alpha to 1.0. */
89  int talpha;
91 
92 /* This one uses nodes. */
93 
101 int multitex_ext(struct Tex *tex,
102  float texvec[3],
103  float dxt[3],
104  float dyt[3],
105  int osatex,
106  struct TexResult *texres,
107  short thread,
108  struct ImagePool *pool,
109  bool scene_color_manage,
110  bool skip_load_image);
111 
118 int multitex_ext_safe(struct Tex *tex,
119  const float texvec[3],
120  struct TexResult *texres,
121  struct ImagePool *pool,
122  bool scene_color_manage,
123  bool skip_load_image);
124 
131 int multitex_nodes(struct Tex *tex,
132  const float texvec[3],
133  float dxt[3],
134  float dyt[3],
135  int osatex,
136  struct TexResult *texres,
137  short thread,
138  short which_output,
139  struct MTex *mtex,
140  struct ImagePool *pool);
141 
142 #ifdef __cplusplus
143 }
144 #endif
#define ATTR_NONNULL(...)
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
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, struct MTex *mtex, struct ImagePool *pool)
int multitex_ext(struct Tex *tex, 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_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
Definition: thread.h:34
const Depsgraph * depsgraph
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
int talpha
Definition: RE_texture.h:89
float tin
Definition: RE_texture.h:86
float trgba[4]
Definition: RE_texture.h:87