Blender V2.61 - r43446
Functions | Variables

pixelshading.c File Reference

#include <float.h>
#include <math.h>
#include <string.h>
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "DNA_camera_types.h"
#include "DNA_group_types.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_image_types.h"
#include "DNA_texture_types.h"
#include "DNA_lamp_types.h"
#include "BKE_colortools.h"
#include "BKE_image.h"
#include "BKE_global.h"
#include "BKE_material.h"
#include "BKE_texture.h"
#include "render_types.h"
#include "renderpipeline.h"
#include "renderdatabase.h"
#include "texture.h"
#include "pixelblending.h"
#include "rendercore.h"
#include "shadbuf.h"
#include "pixelshading.h"
#include "shading.h"
#include "sunsky.h"

Go to the source code of this file.

Functions

static void render_lighting_halo (HaloRen *har, float col_r[3])
static float haloZtoDist (int z)
int shadeHaloFloat (HaloRen *har, float *col, int zz, float dist, float xn, float yn, short flarec)
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])
void shadeSkyPixel (float collector[4], float fx, float fy, short thread)
void shadeAtmPixel (struct SunSky *sunsky, float collector[3], float fx, float fy, float distance)

Variables

struct Render R
float hashvectf []

Detailed Description

Definition in file pixelshading.c.


Function Documentation

static float haloZtoDist ( int  z) [static]

Converts a halo z-buffer value to distance from the camera's near plane

Parameters:
zThe z-buffer value to convert
Returns:
a distance from the camera's near plane in blender units

Definition at line 258 of file pixelshading.c.

References R, and R_ORTHO.

Referenced by shadeHaloFloat().

static void render_lighting_halo ( HaloRen har,
float  col_r[3] 
) [static]
void shadeAtmPixel ( struct SunSky sunsky,
float  collector[3],
float  fx,
float  fy,
float  distance 
)

Definition at line 648 of file pixelshading.c.

References AtmospherePixleShader(), calc_view_vector(), and normalize_v3().

int shadeHaloFloat ( HaloRen har,
float *  col,
int  zz,
float  dist,
float  xn,
float  yn,
short  flarec 
)
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, HaloRen::co, 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, HaloRen::r, 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] 
)

Variable Documentation

float hashvectf[]

Definition at line 177 of file noise.c.

Referenced by orgBlenderNoise(), ray_trace_shadow_rad(), renderflare(), and shadeHaloFloat().

struct Render R

Definition at line 127 of file pipeline.c.