Blender V2.61 - r43446
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 col_r[4])
void do_sky_tex (const float rco[3], float lo[3], const float dxyview[2], float hor[3], float zen[3], float *blend, int skyflag, short thread)
void do_material_tex (struct ShadeInput *shi, struct Render *re)
void do_lamp_tex (LampRen *la, const float lavec[3], struct ShadeInput *shi, float col_r[3], int effect)
void do_volume_tex (struct ShadeInput *shi, const float xyz[3], int mapto_flag, float col[3], float *val, struct Render *re)
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, const float texvec[3], const float dxt[3], const float dyt[3], struct TexResult *texres)
int imagewrap (struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, const float texvec[3], struct TexResult *texres)
void image_sample (struct Image *ima, float fx, float fy, float dx, float dy, float *result)

Detailed Description

Definition in file blender/render/intern/include/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 39 of file blender/render/intern/include/texture.h.

Referenced by blend(), clouds(), marble(), mg_distNoiseTex(), mg_HTerrainTex(), mg_mFractalOrfBmTex(), mg_ridgedOrHybridMFTex(), ocean_texture(), 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 44 of file blender/render/intern/include/texture.h.

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

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

Definition at line 60 of file blender/render/intern/include/texture.h.


Function Documentation

void do_halo_tex ( struct HaloRen har,
float  xn,
float  yn,
float  col_r[4] 
)
void do_lamp_tex ( LampRen la,
const float  lavec[3],
struct ShadeInput shi,
float  col_r[3],
int  effect 
)
void do_material_tex ( struct ShadeInput shi,
struct Render re 
)

Definition at line 2163 of file render_texture.c.

References ShadeInput::actuv, add_v3_v3v3(), ShadeInput::alpha, MTex::alphafac, ShadeInput::amb, World::ambb, ShadeInput::ambb, MTex::ambfac, World::ambg, ShadeInput::ambg, World::ambr, ShadeInput::ambr, B, MTex::b, BKE_image_get_ibuf(), MTex::blendtype, calc_R_ref(), ShadeInput::co, co, MTex::colfac, RenderData::color_mgt_flag, MTex::colspecfac, compatible_bump_compute(), compatible_bump_init(), compatible_bump_uv_derivs(), copy_v3_v3(), 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, fabsf, MTex::g, ShadeInput::gl, ShadeInput::har, MTex::hardfac, i, Tex::ima, Tex::imaflag, Object::imat_ren, Tex::iuser, len(), 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_BICUBIC_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, ShadeInput::r, MTex::r, Render::r, R_COLOR_MANAGEMENT, R_NO_TEX, ShadeInput::ray_mirror, MTex::raymirrfac, ImBuf::rect_float, ShadeInput::ref, ShadeInput::refcol, ShadeInput::refl, RenderData::scemode, 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_DERIVATIVEMAP, TEX_ENVMAP, TEX_IMAGE, TEX_NOR, TEX_NORMALMAP, TEX_OCEAN, 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, Render::viewmat, ShadeInput::vlr, ShadeInput::vn, MTex::warpfac, ShadeInput::winco, and Render::wrld.

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

Definition at line 155 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,
const float  texvec[3],
struct TexResult texres 
)
int imagewraposa ( struct Tex tex,
struct Image ima,
struct ImBuf ibuf,
const float  texvec[3],
const float  dxt[3],
const float  dyt[3],
struct TexResult texres 
)
void init_render_textures ( Render re)
void render_realtime_texture ( struct ShadeInput shi,
struct Image ima 
)