Blender V2.61 - r43446
Functions

pixelshading.h File Reference

Go to the source code of this file.

Functions

int shadeHaloFloat (HaloRen *har, float *col, int zz, float dist, float xn, float yn, short flarec)
void shadeSkyPixel (float collector[4], float fx, float fy, short thread)
void shadeSkyView (float col_r[3], const float rco[3], const float view[3], const float dxyview[2], short thread)
void shadeAtmPixel (struct SunSky *sunsky, float *collector, float fx, float fy, float distance)
void shadeSunView (float col_r[3], const float view[3])

Detailed Description

Definition in file pixelshading.h.


Function Documentation

void shadeAtmPixel ( struct SunSky sunsky,
float *  collector,
float  fx,
float  fy,
float  distance 
)

Referenced by atm_tile().

int shadeHaloFloat ( HaloRen har,
float *  col,
int  zz,
float  dist,
float  xn,
float  yn,
short  flarec 
)

Render the pixel at (x,y) for object ap. Apply the jitter mask. Output is given in float collector[4]. The type vector: t[0] - min. distance t[1] - face/halo index t[2] - jitter mask t[3] - type ZB_POLY or ZB_HALO t[4] - max. distance mask is pixel coverage in bits

Returns:
pointer to the object
Parameters:
col(float[4]) Store the rgb color here (with alpha) The alpha is used to blend the color to the background color_new = (1-alpha)*color_background + color
zzThe current zbuffer value at the place of this pixel
distDistance of the pixel from the center of the halo squared. Given in pixels
xnThe x coordinate of the pixel relaticve to the center of the halo. given in pixels
ynThe y coordinate of the pixel relaticve to the center of the halo. given in pixels

Definition at line 282 of file pixelshading.c.

References HaloRen::alfa, angle(), KDL::atan2(), HaloRen::b, co, HaloRen::co, HaloRen::cos, cosf, do_halo_tex(), fabs(), fabsf, HaloRen::g, HA_FLARECIRC, HA_ONLYSKY, HA_VECT, HA_XALPHA, haloZtoDist(), HaloRen::hard, hashvectf, HaloRen::hasize, HaloRen::linec, M_PI_2, MA_HALO_SHADE, MA_HALO_SOFT, HaloRen::mat, Material::mirb, Material::mirg, Material::mirr, mistfactor(), Material::mode, HaloRen::pixels, R, HaloRen::r, HaloRen::rad, HaloRen::radsq, render_lighting_halo(), HaloRen::ringc, sasqrt(), HaloRen::seed, si, HaloRen::sin, sinf, Material::specb, Material::specg, Material::specr, sqrt(), sqrtf, HaloRen::starpoints, HaloRen::tex, HaloRen::type, WO_MIST, HaloRen::zd, and HaloRen::zs.

Referenced by halo_pixelstruct(), halo_tile(), and renderhalo_post().

void shadeSkyPixel ( float  collector[4],
float  fx,
float  fy,
short  thread 
)

Render the sky at pixel (x, y).

Definition at line 598 of file pixelshading.c.

References calc_view_vector(), copy_v3_v3(), normalize_v3(), NULL, R, shadeSkyView(), shadeSunView(), WO_SKYBLEND, WO_SKYPAPER, and WO_SKYTEX.

Referenced by sky_tile().

void shadeSkyView ( float  col_r[3],
const float  rco[3],
const float  view[3],
const float  dxyview[2],
short  thread 
)
void shadeSunView ( float  col_r[3],
const float  view[3] 
)