Blender  V2.59
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 *colf)
static float haloZtoDist (int z)
int shadeHaloFloat (HaloRen *har, float *col, int zz, float dist, float xn, float yn, short flarec)
void shadeSkyView (float *colf, float *rco, float *view, float *dxyview, short thread)
void shadeSunView (float *colf, float *view)
void shadeSkyPixel (float *collector, float fx, float fy, short thread)
void shadeAtmPixel (struct SunSky *sunsky, float *collector, 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 261 of file pixelshading.c.

References R, and R_ORTHO.

Referenced by shadeHaloFloat().

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

Definition at line 652 of file pixelshading.c.

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

Referenced by atm_tile().

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 285 of file pixelshading.c.

References HaloRen::alfa, angle(), KDL::atan2(), HaloRen::b, HaloRen::co, co, cos(), HaloRen::cos, do_halo_tex(), fabs(), 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, sin(), HaloRen::sin, Material::specb, Material::specg, Material::specr, sqrt(), 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,
float  fx,
float  fy,
short  thread 
)

Render the sky at pixel (x, y).

Definition at line 602 of file pixelshading.c.

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

Referenced by sky_tile().

void shadeSkyView ( float *  colf,
float *  rco,
float *  view,
float *  dxyview,
short  thread 
)
void shadeSunView ( float *  colf,
float *  view 
)

Variable Documentation

float hashvectf[]

Definition at line 178 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.