Blender V2.61 - r43446
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 (const float col[3])
static float vol_get_shadow (ShadeInput *shi, LampRen *lar, const float co[3])
static int vol_get_bounds (ShadeInput *shi, const float co[3], const float vec[3], float hitco[3], Isect *isect, int intersect_type)
static void shade_intersection (ShadeInput *shi, float col_r[4], Isect *is)
static void vol_trace_behind (ShadeInput *shi, VlakRen *vlr, const float co[3], float col_r[4])
static void vol_get_precached_scattering (Render *re, ShadeInput *shi, float scatter_col[3], const float co[3])
static float metadensity (Object *ob, const float co[3])
float vol_get_density (struct ShadeInput *shi, const float co[3])
static void vol_get_reflection_color (ShadeInput *shi, float ref_col[3], const float co[3])
static void vol_get_emission (ShadeInput *shi, float emission_col[3], const float co[3])
static void vol_get_sigma_t (ShadeInput *shi, float sigma_t[3], const float co[3])
static float vol_get_phasefunc (ShadeInput *UNUSED(shi), float g, const float w[3], const float wp[3])
static void vol_get_transmittance_seg (ShadeInput *shi, float tr[3], float stepsize, const float co[3], float density)
static void vol_get_transmittance (ShadeInput *shi, float tr[3], const float co[3], const float endco[3])
static void vol_shade_one_lamp (struct ShadeInput *shi, const float co[3], const float view[3], LampRen *lar, float lacol[3])
void vol_get_scattering (ShadeInput *shi, float scatter_col[3], const float co[3], const float view[3])
static void volumeintegrate (struct ShadeInput *shi, float col[4], const float co[3], const float endco[3])
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 ( const float  col[3])

Definition at line 72 of file volumetric.c.

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

static float metadensity ( Object ob,
const float  co[3] 
) [static]

Definition at line 240 of file volumetric.c.

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

Referenced by vol_get_density().

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

Definition at line 791 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,
const float  co[3],
const float  vec[3],
float  hitco[3],
Isect isect,
int  intersect_type 
) [static]
float vol_get_density ( struct ShadeInput shi,
const float  co[3] 
)
static void vol_get_emission ( ShadeInput shi,
float  emission_col[3],
const float  co[3] 
) [static]
static float vol_get_phasefunc ( ShadeInput UNUSEDshi,
float  g,
const float  w[3],
const float  wp[3] 
) [static]

Definition at line 363 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[3],
const float  co[3] 
) [static]
static void vol_get_reflection_color ( ShadeInput shi,
float  ref_col[3],
const float  co[3] 
) [static]
void vol_get_scattering ( ShadeInput shi,
float  scatter_col[3],
const float  co[3],
const float  view[3] 
)
static float vol_get_shadow ( ShadeInput shi,
LampRen lar,
const float  co[3] 
) [static]
static void vol_get_sigma_t ( ShadeInput shi,
float  sigma_t[3],
const float  co[3] 
) [static]
static void vol_get_transmittance ( ShadeInput shi,
float  tr[3],
const float  co[3],
const float  endco[3] 
) [static]
static void vol_get_transmittance_seg ( ShadeInput shi,
float  tr[3],
float  stepsize,
const float  co[3],
float  density 
) [static]

Definition at line 410 of file volumetric.c.

References expf, and vol_get_sigma_t().

Referenced by volumeintegrate().

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

Variable Documentation

struct Render R

Definition at line 127 of file pipeline.c.