Blender  V2.59
Defines | Functions
texture.h File Reference

Go to the source code of this file.

Defines

#define BRICONT
#define BRICONTRGB
#define RGBTOBW(r, g, b)   ( r*0.35f + g*0.45f + b*0.2f )

Functions

void do_halo_tex (struct HaloRen *har, float xn, float yn, float *colf)
void do_sky_tex (float *rco, float *lo, float *dxyview, float *hor, float *zen, float *blend, int skyflag, short thread)
void do_material_tex (struct ShadeInput *shi)
void do_lamp_tex (LampRen *la, float *lavec, struct ShadeInput *shi, float *colf, int effect)
void do_volume_tex (struct ShadeInput *shi, float *xyz, int mapto_flag, float *col, float *val)
void init_render_textures (Render *re)
void end_render_textures (Render *re)
void render_realtime_texture (struct ShadeInput *shi, struct Image *ima)
int imagewraposa (struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, float *texvec, float *dxt, float *dyt, struct TexResult *texres)
int imagewrap (struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, float *texvec, struct TexResult *texres)
void image_sample (struct Image *ima, float fx, float fy, float dx, float dy, float *result)

Detailed Description

Definition in file texture.h.


Define Documentation

#define BRICONT
Value:
texres->tin= (texres->tin-0.5f)*tex->contrast+tex->bright-0.5f; \
if(texres->tin<0.0f) texres->tin= 0.0f; else if(texres->tin>1.0f) texres->tin= 1.0f;

Definition at line 40 of file texture.h.

Referenced by blend(), clouds(), marble(), mg_distNoiseTex(), mg_HTerrainTex(), mg_mFractalOrfBmTex(), mg_ridgedOrHybridMFTex(), plugintex(), pointdensitytex(), texnoise(), voronoiTex(), voxeldatatex(), and wood().

#define BRICONTRGB
Value:
texres->tr= tex->rfac*((texres->tr-0.5f)*tex->contrast+tex->bright-0.5f); \
if(texres->tr<0.0f) texres->tr= 0.0f; \
texres->tg= tex->gfac*((texres->tg-0.5f)*tex->contrast+tex->bright-0.5f); \
if(texres->tg<0.0f) texres->tg= 0.0f; \
texres->tb= tex->bfac*((texres->tb-0.5f)*tex->contrast+tex->bright-0.5f); \
if(texres->tb<0.0f) texres->tb= 0.0f; \
if(tex->saturation != 1.0f) { \
        float _hsv[3]; \
        rgb_to_hsv(texres->tr, texres->tg, texres->tb, _hsv, _hsv+1, _hsv+2); \
        _hsv[1] *= tex->saturation; \
        hsv_to_rgb(_hsv[0], _hsv[1], _hsv[2], &texres->tr, &texres->tg, &texres->tb); \
} \

Definition at line 43 of file texture.h.

Referenced by clouds(), imagewrap(), imagewraposa(), imagewraposa_aniso(), magic(), plugintex(), pointdensitytex(), voronoiTex(), and voxeldatatex().

#define RGBTOBW (   r,
  g,
 
)    ( r*0.35f + g*0.45f + b*0.2f )

Definition at line 56 of file texture.h.


Function Documentation

void do_halo_tex ( struct HaloRen har,
float  xn,
float  yn,
float *  colf 
)
void do_lamp_tex ( LampRen la,
float *  lavec,
struct ShadeInput shi,
float *  colf,
int  effect 
)
void do_material_tex ( struct ShadeInput shi)

Definition at line 2110 of file render_texture.c.

References ShadeInput::actuv, ShadeInput::alpha, MTex::alphafac, ShadeInput::amb, ShadeInput::ambb, MTex::ambfac, ShadeInput::ambg, ShadeInput::ambr, MTex::b, B, BKE_image_get_ibuf(), MTex::blendtype, calc_R_ref(), ShadeInput::co, co, MTex::colfac, MTex::colspecfac, compatible_bump_compute(), compatible_bump_init(), compatible_bump_uv_derivs(), cos(), cross_v3_v3v3(), MTex::def_var, MTex::difffac, MTex::dispfac, ShadeInput::displace, dot(), dot_v3v3(), ShadeInput::duplilo, ObjectInstanceRen::duplitexmat, ShadeInput::dupliuv, ShadeInput::dxco, ShadeInput::dxgl, ShadeInput::dxlo, ShadeInput::dxno, ShadeInput::dxref, ShadeInput::dxsticky, ShadeInput::dxstrand, ShadeInputUV::dxuv, ShadeInput::dxwin, ShadeInput::dyco, ShadeInput::dygl, ShadeInput::dylo, ShadeInput::dyno, ShadeInput::dyref, ShadeInput::dysticky, ShadeInput::dystrand, ShadeInputUV::dyuv, ShadeInput::dywin, ShadeInput::emit, MTex::emitfac, fabs(), MTex::g, ShadeInput::gl, ShadeInput::har, MTex::hardfac, i, Tex::ima, Tex::imaflag, Object::imat_ren, INPR, Tex::iuser, ShadeInput::lo, MA_TANGENT_V, madd_v3_v3fl(), MAP_ALPHA, MAP_AMB, MAP_COL, MAP_COLMIR, MAP_COLSPEC, MAP_DISPLACE, MAP_EMIT, MAP_HAR, MAP_NORM, MAP_RAYMIRR, MAP_REF, MAP_SPEC, MAP_TRANSLU, MAP_VARS, MAP_WARP, MTex::mapto, ShadeInput::mat, MAX_MTEX, ShadeInput::mirr, MTex::mirrfac, Material::mode, Material::mtex, MTEX_3TAP_BUMP, MTEX_5TAP_BUMP, MTEX_BLEND, MTEX_COMPAT_BUMP, MTEX_DUPLI_MAPTO, MTEX_MUL, MTEX_NEGATIVE, MTEX_NSPACE_CAMERA, MTEX_NSPACE_OBJECT, MTEX_NSPACE_TANGENT, MTEX_NSPACE_WORLD, MTEX_OB_DUPLI_ORIG, MTEX_RGBTOINT, MTEX_STENCIL, MTEX_SUB, MTEX_VIEWSPACE, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), multitex_mtex(), ShadeInputUV::name, ShadeInput::nmapnorm, ShadeInput::nmaptang, Tex::nodetree, TexResult::nor, MTex::norfac, normalize_v3(), MTex::normapspace, ntap_bump_compute(), ntap_bump_init(), NULL, ObjectRen::ob, ShadeInput::obi, MTex::object, Object::obmat, ShadeInput::obr, ShadeInput::orn, ShadeInput::osatex, MTex::r, ShadeInput::r, R, R_COLOR_MANAGEMENT, R_NO_TEX, ShadeInput::ray_mirror, MTex::raymirrfac, ImBuf::rect_float, ShadeInput::ref, ShadeInput::refcol, ShadeInput::refl, Material::septex, si, sin(), ShadeInput::spec, MTex::specfac, ShadeInput::specr, srgb_to_linearrgb_v3_v3(), ShadeInput::sticky, ShadeInput::strandco, ShadeInput::stress, TexResult::ta, TexResult::talpha, ShadeInput::tang, TexResult::tb, MTex::tex, TEX_ENVMAP, TEX_IMAGE, TEX_NOR, TEX_NORMALMAP, TEX_RGB, MTex::texco, TEXCO_GLOB, texco_mapping(), TEXCO_NORM, TEXCO_OBJECT, TEXCO_ORCO, TEXCO_REFL, TEXCO_STICKY, TEXCO_STRAND, TEXCO_STRESS, TEXCO_TANGENT, TEXCO_UV, TEXCO_WINDOW, MTex::texflag, texture_rgb_blend(), texture_value_blend(), TexResult::tg, TexResult::tin, ShadeInput::totuv, TexResult::tr, MTex::translfac, ShadeInput::translucency, Tex::type, Tex::use_nodes, ShadeInputUV::uv, ShadeInput::uv, MTex::uvname, VECADD, VECCOPY, ShadeInput::vlr, ShadeInput::vn, MTex::warpfac, and ShadeInput::winco.

void do_sky_tex ( float *  rco,
float *  lo,
float *  dxyview,
float *  hor,
float *  zen,
float *  blend,
int  skyflag,
short  thread 
)
void do_volume_tex ( struct ShadeInput shi,
float *  xyz,
int  mapto_flag,
float *  col,
float *  val 
)
void end_render_textures ( Render re)

Definition at line 151 of file render_texture.c.

References end_render_texture(), ListBase::first, Tex::id, Render::main, ID::next, Main::tex, and ID::us.

Referenced by RE_Database_Free().

void image_sample ( struct Image ima,
float  fx,
float  fy,
float  dx,
float  dy,
float *  result 
)
int imagewrap ( struct Tex tex,
struct Image ima,
struct ImBuf ibuf,
float *  texvec,
struct TexResult texres 
)
int imagewraposa ( struct Tex tex,
struct Image ima,
struct ImBuf ibuf,
float *  texvec,
float *  dxt,
float *  dyt,
struct TexResult texres 
)
void init_render_textures ( Render re)
void render_realtime_texture ( struct ShadeInput shi,
struct Image ima 
)