Blender V2.61 - r43446
Classes | Typedefs | Functions | Variables

volume_precache.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_threads.h"
#include "BLI_voxel.h"
#include "BLI_utildefines.h"
#include "PIL_time.h"
#include "RE_shader_ext.h"
#include "DNA_material_types.h"
#include "rayintersection.h"
#include "rayobject.h"
#include "render_types.h"
#include "rendercore.h"
#include "renderdatabase.h"
#include "volumetric.h"
#include "volume_precache.h"
#include "BKE_global.h"

Go to the source code of this file.

Classes

struct  VolPrecacheQueue

Typedefs

typedef struct VolPrecacheQueue VolPrecacheQueue

Functions

static int intersect_outside_volume (RayObject *tree, Isect *isect, float *offset, int limit, int depth)
static int point_inside_obi (RayObject *tree, ObjectInstanceRen *UNUSED(obi), float *co)
void global_bounds_obi (Render *re, ObjectInstanceRen *obi, float *bbmin, float *bbmax)
static float get_avg_surrounds (float *cache, int *res, int xx, int yy, int zz)
static void lightcache_filter (VolumePrecache *vp)
static int ms_I (int x, int y, int z, int *n)
static int v_I_pad (int x, int y, int z, int *n)
static int lc_to_ms_I (int x, int y, int z, int *n)
static float total_ss_energy (Render *re, int do_test_break, VolumePrecache *vp)
static float total_ms_energy (Render *re, int do_test_break, float *sr, float *sg, float *sb, int *res)
static void ms_diffuse (Render *re, int do_test_break, float *x0, float *x, float diff, int *n)
static void multiple_scattering_diffusion (Render *re, VolumePrecache *vp, Material *ma)
static void * vol_precache_part (void *data)
static void precache_setup_shadeinput (Render *re, ObjectInstanceRen *obi, Material *ma, ShadeInput *shi)
static void precache_init_parts (Render *re, RayObject *tree, ShadeInput *shi, ObjectInstanceRen *obi, int totthread, int *parts)
static int precache_resolution (Render *re, VolumePrecache *vp, ObjectInstanceRen *obi, int res)
static void vol_precache_objectinstance_threads (Render *re, ObjectInstanceRen *obi, Material *ma)
static int using_lightcache (Material *ma)
void volume_precache (Render *re)
void free_volume_precache (Render *re)
int point_inside_volume_objectinstance (Render *re, ObjectInstanceRen *obi, float *co)

Variables

struct Render R

Detailed Description

Definition in file volume_precache.c.


Typedef Documentation


Function Documentation

void free_volume_precache ( Render re)
static float get_avg_surrounds ( float *  cache,
int *  res,
int  xx,
int  yy,
int  zz 
) [static]

Definition at line 166 of file volume_precache.c.

References i, and V_I.

Referenced by lightcache_filter().

void global_bounds_obi ( Render re,
ObjectInstanceRen obi,
float *  bbmin,
float *  bbmax 
)
static int intersect_outside_volume ( RayObject tree,
Isect isect,
float *  offset,
int  limit,
int  depth 
) [static]
static int lc_to_ms_I ( int  x,
int  y,
int  z,
int *  n 
) [inline, static]

Definition at line 279 of file volume_precache.c.

Referenced by multiple_scattering_diffusion().

static void lightcache_filter ( VolumePrecache vp) [static]
static void ms_diffuse ( Render re,
int  do_test_break,
float *  x0,
float *  x,
float  diff,
int *  n 
) [static]

Definition at line 333 of file volume_precache.c.

References i, size(), Render::tbh, Render::test_break, v_I_pad(), and VOL_MS_TIMESTEP.

Referenced by multiple_scattering_diffusion().

static int ms_I ( int  x,
int  y,
int  z,
int *  n 
) [inline, static]

Definition at line 267 of file volume_precache.c.

Referenced by multiple_scattering_diffusion(), and total_ms_energy().

static void multiple_scattering_diffusion ( Render re,
VolumePrecache vp,
Material ma 
) [static]
static int point_inside_obi ( RayObject tree,
ObjectInstanceRen UNUSEDobi,
float *  co 
) [static]
int point_inside_volume_objectinstance ( Render re,
ObjectInstanceRen obi,
float *  co 
)

Definition at line 842 of file volume_precache.c.

References makeraytree_object(), and point_inside_obi().

Referenced by init_camera_inside_volumes().

static void precache_init_parts ( Render re,
RayObject tree,
ShadeInput shi,
ObjectInstanceRen obi,
int  totthread,
int *  parts 
) [static]
static int precache_resolution ( Render re,
VolumePrecache vp,
ObjectInstanceRen obi,
int  res 
) [static]
static void precache_setup_shadeinput ( Render re,
ObjectInstanceRen obi,
Material ma,
ShadeInput shi 
) [static]
static float total_ms_energy ( Render re,
int  do_test_break,
float *  sr,
float *  sg,
float *  sb,
int *  res 
) [static]

Definition at line 311 of file volume_precache.c.

References i, ms_I(), Render::tbh, and Render::test_break.

Referenced by multiple_scattering_diffusion().

static float total_ss_energy ( Render re,
int  do_test_break,
VolumePrecache vp 
) [static]
static int using_lightcache ( Material ma) [static]
static int v_I_pad ( int  x,
int  y,
int  z,
int *  n 
) [inline, static]

Definition at line 273 of file volume_precache.c.

Referenced by ms_diffuse().

static void vol_precache_objectinstance_threads ( Render re,
ObjectInstanceRen obi,
Material ma 
) [static]
static void* vol_precache_part ( void *  data) [static]
void volume_precache ( Render re)

Variable Documentation

struct Render R

Definition at line 127 of file pipeline.c.