Blender  V2.59
Functions | Variables
volumetric.c File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_voxel.h"
#include "BLI_utildefines.h"
#include "RE_shader_ext.h"
#include "DNA_material_types.h"
#include "DNA_group_types.h"
#include "DNA_lamp_types.h"
#include "DNA_meta_types.h"
#include "BKE_global.h"
#include "render_types.h"
#include "pixelshading.h"
#include "rayintersection.h"
#include "rayobject.h"
#include "shading.h"
#include "shadbuf.h"
#include "texture.h"
#include "volumetric.h"
#include "volume_precache.h"

Go to the source code of this file.

Functions

BM_INLINE float luminance (float *col)
static float vol_get_shadow (ShadeInput *shi, LampRen *lar, float *co)
static int vol_get_bounds (ShadeInput *shi, float *co, float *vec, float *hitco, Isect *isect, int intersect_type)
static void shade_intersection (ShadeInput *shi, float *col, Isect *is)
static void vol_trace_behind (ShadeInput *shi, VlakRen *vlr, float *co, float *col)
static void vol_get_precached_scattering (Render *re, ShadeInput *shi, float *scatter_col, float *co)
static float metadensity (Object *ob, float *co)
float vol_get_density (struct ShadeInput *shi, float *co)
static void vol_get_reflection_color (ShadeInput *shi, float *ref_col, float *co)
static void vol_get_emission (ShadeInput *shi, float *emission_col, float *co)
static void vol_get_sigma_t (ShadeInput *shi, float *sigma_t, float *co)
static float vol_get_phasefunc (ShadeInput *UNUSED(shi), float g, float *w, float *wp)
static void vol_get_transmittance_seg (ShadeInput *shi, float *tr, float stepsize, float *co, float density)
static void vol_get_transmittance (ShadeInput *shi, float *tr, float *co, float *endco)
static void vol_shade_one_lamp (struct ShadeInput *shi, float *co, LampRen *lar, float *lacol)
void vol_get_scattering (ShadeInput *shi, float *scatter_col, float *co)
static void volumeintegrate (struct ShadeInput *shi, float *col, float *co, float *endco)
static void volume_trace (struct ShadeInput *shi, struct ShadeResult *shr, int inside_volume)
void shade_volume_shadow (struct ShadeInput *shi, struct ShadeResult *shr, struct Isect *last_is)
void shade_volume_outside (ShadeInput *shi, ShadeResult *shr)
void shade_volume_inside (ShadeInput *shi, ShadeResult *shr)

Variables

struct Render R

Detailed Description

Definition in file volumetric.c.


Function Documentation

BM_INLINE float luminance ( float *  col)

Definition at line 73 of file volumetric.c.

Referenced by shade_volume_shadow(), vol_shade_one_lamp(), and volumeintegrate().

static float metadensity ( Object ob,
float *  co 
) [static]

Definition at line 241 of file volumetric.c.

References Object::data, and Render::imat.

Referenced by vol_get_density().

static void shade_intersection ( ShadeInput shi,
float *  col,
Isect is 
) [static]
void shade_volume_inside ( ShadeInput shi,
ShadeResult shr 
)
void shade_volume_outside ( ShadeInput shi,
ShadeResult shr 
)

Definition at line 794 of file volumetric.c.

References VOL_SHADE_OUTSIDE, and volume_trace().

Referenced by shade_input_do_shade(), and shade_ray().

void shade_volume_shadow ( struct ShadeInput shi,
struct ShadeResult shr,
struct Isect last_is 
)
static int vol_get_bounds ( ShadeInput shi,
float *  co,
float *  vec,
float *  hitco,
Isect isect,
int  intersect_type 
) [static]
float vol_get_density ( struct ShadeInput shi,
float *  co 
)
static void vol_get_emission ( ShadeInput shi,
float *  emission_col,
float *  co 
) [static]
static float vol_get_phasefunc ( ShadeInput UNUSEDshi,
float  g,
float *  w,
float *  wp 
) [static]

Definition at line 364 of file volumetric.c.

References dot_v3v3(), g, and normalize().

Referenced by vol_shade_one_lamp().

static void vol_get_precached_scattering ( Render re,
ShadeInput shi,
float *  scatter_col,
float *  co 
) [static]
static void vol_get_reflection_color ( ShadeInput shi,
float *  ref_col,
float *  co 
) [static]
void vol_get_scattering ( ShadeInput shi,
float *  scatter_col,
float *  co 
)
static float vol_get_shadow ( ShadeInput shi,
LampRen lar,
float *  co 
) [static]
static void vol_get_sigma_t ( ShadeInput shi,
float *  sigma_t,
float *  co 
) [static]
static void vol_get_transmittance ( ShadeInput shi,
float *  tr,
float *  co,
float *  endco 
) [static]
static void vol_get_transmittance_seg ( ShadeInput shi,
float *  tr,
float  stepsize,
float *  co,
float  density 
) [static]

Definition at line 411 of file volumetric.c.

References KDL::exp(), and vol_get_sigma_t().

Referenced by volumeintegrate().

static void vol_shade_one_lamp ( struct ShadeInput shi,
float *  co,
LampRen lar,
float *  lacol 
) [static]
static void vol_trace_behind ( ShadeInput shi,
VlakRen vlr,
float *  co,
float *  col 
) [static]
static void volume_trace ( struct ShadeInput shi,
struct ShadeResult shr,
int  inside_volume 
) [static]
static void volumeintegrate ( struct ShadeInput shi,
float *  col,
float *  co,
float *  endco 
) [static]

Variable Documentation

struct Render R

Definition at line 127 of file pipeline.c.