Blender V5.0
RE_texture.h File Reference

Go to the source code of this file.

Classes

struct  TexResult

Functions

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
bool float texture_value_blend (float tex, float out, float fact, float facg, int blendtype)
void RE_texture_rng_init (void)
void RE_texture_rng_exit (void)
void ibuf_sample (struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float result[4])
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)
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)

Detailed Description

This include is for non-render pipeline exports (still old cruft here).

Definition in file RE_texture.h.

Function Documentation

◆ ibuf_sample()

void ibuf_sample ( struct ImBuf * ibuf,
float fx,
float fy,
float dx,
float dy,
float result[4] )

◆ multitex_ext()

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 )

WARNING(@ideasman42): if the texres's values are not declared zero, check the return value to be sure the color values are set before using the r/g/b values, otherwise you may use uninitialized values.

Use it for stuff which is out of render pipeline.

Definition at line 923 of file texture_procedural.cc.

References multitex_nodes_intern().

Referenced by do_texture_effector().

◆ multitex_ext_safe()

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 )

Nodes disabled. extern-tex doesn't support nodes (#ntreeBeginExec() can't be called when rendering is going on).

Use it for stuff which is out of render pipeline.

Definition at line 944 of file texture_procedural.cc.

References multitex_nodes_intern().

Referenced by BKE_texture_get_value_ex(), dynamic_paint_set_init_color_tex_to_imseq_cb(), and dynamic_paint_set_init_color_tex_to_vcol_cb().

◆ multitex_nodes()

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 )

Only for internal node usage.

this is called from the shader and texture nodes Use it from render pipeline only!

◆ RE_texture_evaluate()

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] )
Parameters
poolThread pool, may be NULL.
Returns
True if the texture has color, otherwise false.

References out, and result.

◆ RE_texture_rng_exit()

void RE_texture_rng_exit ( void )

Definition at line 42 of file texture_procedural.cc.

References BLI_rng_threaded_free(), and random_tex_array.

Referenced by BKE_blender_free().

◆ RE_texture_rng_init()

void RE_texture_rng_init ( void )

Definition at line 37 of file texture_procedural.cc.

References BLI_rng_threaded_new(), and random_tex_array.

Referenced by main().

◆ texture_value_blend()

bool float texture_value_blend ( float tex,
float out,
float fact,
float facg,
int blendtype )
Parameters
inDestination
texTexture.
outPrevious color.
factTexture strength.
facgButton strength value.

Definition at line 957 of file texture_procedural.cc.

References ATTR_FALLTHROUGH, fabsf, in, max_ff(), min_ff(), MTEX_ADD, MTEX_BLEND, MTEX_DARK, MTEX_DIFF, MTEX_DIV, MTEX_LIGHT, MTEX_LIN_LIGHT, MTEX_MUL, MTEX_OVERLAY, MTEX_SCREEN, MTEX_SOFT_LIGHT, MTEX_SUB, and out.

Referenced by get_cpa_texture(), and psys_get_texture().