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

rendercore.c File Reference

#include <stdio.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <assert.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_jitter.h"
#include "BLI_rand.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "DNA_image_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_group_types.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_texture.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "rayintersection.h"
#include "rayobject.h"
#include "renderpipeline.h"
#include "render_result.h"
#include "render_types.h"
#include "renderdatabase.h"
#include "occlusion.h"
#include "pixelblending.h"
#include "pixelshading.h"
#include "shadbuf.h"
#include "shading.h"
#include "sss.h"
#include "zbuf.h"
#include "PIL_time.h"
#include "rendercore.h"

Go to the source code of this file.

Classes

struct  ZbufSolidData
struct  ZBufSSSHandle
struct  BakeShade

Typedefs

typedef struct ZbufSolidData ZbufSolidData
typedef struct ZBufSSSHandle ZBufSSSHandle
typedef struct BakeShade BakeShade

Functions

void calc_view_vector (float *view, float x, float y)
void calc_renderco_ortho (float co[3], float x, float y, int z)
void calc_renderco_zbuf (float co[3], const float view[3], int z)
int count_mask (unsigned short mask)
static int calchalo_z (HaloRen *har, int zz)
static void halo_pixelstruct (HaloRen *har, RenderLayer **rlpp, int totsample, int od, float dist, float xn, float yn, PixStr *ps)
static void halo_tile (RenderPart *pa, RenderLayer *rl)
static void lamphalo_tile (RenderPart *pa, RenderLayer *rl)
static void add_filt_passes (RenderLayer *rl, int curmask, int rectx, int offset, ShadeInput *shi, ShadeResult *shr)
static void add_passes (RenderLayer *rl, int offset, ShadeInput *shi, ShadeResult *shr)
int get_sample_layers (RenderPart *pa, RenderLayer *rl, RenderLayer **rlpp)
static void sky_tile (RenderPart *pa, RenderLayer *rl)
static void atm_tile (RenderPart *pa, RenderLayer *rl)
static void shadeDA_tile (RenderPart *pa, RenderLayer *rl)
static PixStrMain * addpsmain (ListBase *lb)
static void freeps (ListBase *lb)
static void addps (ListBase *lb, intptr_t *rd, int obi, int facenr, int z, int maskz, unsigned short mask)
static void edge_enhance_add (RenderPart *pa, float *rectf, float *arect)
static void convert_to_key_alpha (RenderPart *pa, RenderLayer *rl)
static void edge_enhance_tile (RenderPart *pa, float *rectf, int *rectz)
static void reset_sky_speed (RenderPart *pa, RenderLayer *rl)
static unsigned short * make_solid_mask (RenderPart *pa)
static void addAlphaOverFloatMask (float *dest, float *source, unsigned short dmask, unsigned short smask)
static void make_pixelstructs (RenderPart *pa, ZSpan *zspan, int sample, void *data)
void zbufshadeDA_tile (RenderPart *pa)
void zbufshade_tile (RenderPart *pa)
static void addps_sss (void *cb_handle, int obi, int facenr, int x, int y, int z)
static void shade_sample_sss (ShadeSample *ssamp, Material *mat, ObjectInstanceRen *obi, VlakRen *vlr, int quad, float x, float y, float z, float *co, float *color, float *area)
static void zbufshade_sss_free (RenderPart *pa)
void zbufshade_sss_tile (RenderPart *pa)
static void renderhalo_post (RenderResult *rr, float *rectf, HaloRen *har)
static void renderflare (RenderResult *rr, float *rectf, HaloRen *har)
void add_halo_flare (Render *re)
static void bake_set_shade_input (ObjectInstanceRen *obi, VlakRen *vlr, ShadeInput *shi, int quad, int UNUSED(isect), int x, int y, float u, float v)
static void bake_shade (void *handle, Object *ob, ShadeInput *shi, int UNUSED(quad), int x, int y, float UNUSED(u), float UNUSED(v), float *tvn, float *ttang)
static void bake_displacement (void *handle, ShadeInput *UNUSED(shi), float dist, int x, int y)
static int bake_intersect_tree (RayObject *raytree, Isect *isect, float *start, float *dir, float sign, float *hitco, float *dist)
static void bake_set_vlr_dxyco (BakeShade *bs, float *uv1, float *uv2, float *uv3)
static void do_bake_shade (void *handle, int x, int y, float u, float v)
static int get_next_bake_face (BakeShade *bs)
static void shade_tface (BakeShade *bs)
static void * do_bake_thread (void *bs_v)
void RE_bake_ibuf_filter (ImBuf *ibuf, char *mask, const int filter)
int RE_bake_shade_all_selected (Render *re, int type, Object *actob, short *do_update, float *progress)
struct Image * RE_bake_shade_get_image (void)

Variables

struct Render R

Detailed Description

Definition in file rendercore.c.


Typedef Documentation

typedef struct BakeShade BakeShade
typedef struct ZbufSolidData ZbufSolidData
typedef struct ZBufSSSHandle ZBufSSSHandle

Function Documentation

static void add_filt_passes ( RenderLayer *  rl,
int  curmask,
int  rectx,
int  offset,
ShadeInput *  shi,
ShadeResult *  shr 
) [static]
void add_halo_flare ( Render *  re)
static void add_passes ( RenderLayer *  rl,
int  offset,
ShadeInput *  shi,
ShadeResult *  shr 
) [static]
static void addAlphaOverFloatMask ( float *  dest,
float *  source,
unsigned short  dmask,
unsigned short  smask 
) [static]

Definition at line 1096 of file rendercore.c.

References add(), count_mask(), and mul().

Referenced by zbufshadeDA_tile().

static void addps ( ListBase *  lb,
intptr_t *  rd,
int  obi,
int  facenr,
int  z,
int  maskz,
unsigned short  mask 
) [static]
static void addps_sss ( void *  cb_handle,
int  obi,
int  facenr,
int  x,
int  y,
int  z 
) [static]
static PixStrMain* addpsmain ( ListBase *  lb) [static]
static void atm_tile ( RenderPart *  pa,
RenderLayer *  rl 
) [static]
static void bake_displacement ( void *  handle,
ShadeInput *  UNUSEDshi,
float  dist,
int  x,
int  y 
) [static]
static int bake_intersect_tree ( RayObject *  raytree,
Isect *  isect,
float *  start,
float *  dir,
float  sign,
float *  hitco,
float *  dist 
) [static]
static void bake_set_shade_input ( ObjectInstanceRen *  obi,
VlakRen *  vlr,
ShadeInput *  shi,
int  quad,
int   UNUSEDisect,
int  x,
int  y,
float  u,
float  v 
) [static]
static void bake_set_vlr_dxyco ( BakeShade *  bs,
float *  uv1,
float *  uv2,
float *  uv3 
) [static]
static void bake_shade ( void *  handle,
Object *  ob,
ShadeInput *  shi,
int   UNUSEDquad,
int  x,
int  y,
float   UNUSEDu,
float   UNUSEDv,
float *  tvn,
float *  ttang 
) [static]
void calc_renderco_ortho ( float  co[3],
float  x,
float  y,
int  z 
)

Definition at line 130 of file rendercore.c.

References R.

Referenced by lamphalo_tile(), and shade_input_calc_viewco().

void calc_renderco_zbuf ( float  co[3],
const float  view[3],
int  z 
)

Definition at line 144 of file rendercore.c.

References R.

Referenced by lamphalo_tile(), and shade_input_calc_viewco().

void calc_view_vector ( float *  view,
float  x,
float  y 
)
static int calchalo_z ( HaloRen *  har,
int  zz 
) [static]

Definition at line 165 of file rendercore.c.

References HA_ONLYSKY, and HaloRen::type.

Referenced by halo_pixelstruct(), and halo_tile().

static void convert_to_key_alpha ( RenderPart *  pa,
RenderLayer *  rl 
) [static]
int count_mask ( unsigned short  mask)
static void do_bake_shade ( void *  handle,
int  x,
int  y,
float  u,
float  v 
) [static]
static void* do_bake_thread ( void *  bs_v) [static]
static void edge_enhance_add ( RenderPart *  pa,
float *  rectf,
float *  arect 
) [static]

Definition at line 952 of file rendercore.c.

References addAlphaOverFloat(), NULL, R, RenderPart::rectx, and RenderPart::recty.

Referenced by zbufshade_tile(), and zbufshadeDA_tile().

static void edge_enhance_tile ( RenderPart *  pa,
float *  rectf,
int *  rectz 
) [static]

Definition at line 993 of file rendercore.c.

References NULL, R, RenderPart::rectx, and RenderPart::recty.

Referenced by make_pixelstructs(), and zbufshade_tile().

static void freeps ( ListBase *  lb) [static]
static int get_next_bake_face ( BakeShade *  bs) [static]
int get_sample_layers ( RenderPart *  pa,
RenderLayer *  rl,
RenderLayer **  rlpp 
)
static void halo_pixelstruct ( HaloRen *  har,
RenderLayer **  rlpp,
int  totsample,
int  od,
float  dist,
float  xn,
float  yn,
PixStr *  ps 
) [static]
static void halo_tile ( RenderPart *  pa,
RenderLayer *  rl 
) [static]
static void lamphalo_tile ( RenderPart *  pa,
RenderLayer *  rl 
) [static]
static void make_pixelstructs ( RenderPart *  pa,
ZSpan *  zspan,
int  sample,
void *  data 
) [static]
static unsigned short* make_solid_mask ( RenderPart *  pa) [static]
void RE_bake_ibuf_filter ( ImBuf *  ibuf,
char *  mask,
const int  filter 
)
int RE_bake_shade_all_selected ( Render *  re,
int  type,
Object *  actob,
short *  do_update,
float *  progress 
)
struct Image* RE_bake_shade_get_image ( void  ) [read]

Definition at line 2695 of file rendercore.c.

References R.

Referenced by bake_update().

static void renderflare ( RenderResult *  rr,
float *  rectf,
HaloRen *  har 
) [static]
static void renderhalo_post ( RenderResult *  rr,
float *  rectf,
HaloRen *  har 
) [static]
static void reset_sky_speed ( RenderPart *  pa,
RenderLayer *  rl 
) [static]
static void shade_sample_sss ( ShadeSample *  ssamp,
Material *  mat,
ObjectInstanceRen *  obi,
VlakRen *  vlr,
int  quad,
float  x,
float  y,
float  z,
float *  co,
float *  color,
float *  area 
) [static]
static void shade_tface ( BakeShade *  bs) [static]
static void shadeDA_tile ( RenderPart *  pa,
RenderLayer *  rl 
) [static]
static void sky_tile ( RenderPart *  pa,
RenderLayer *  rl 
) [static]
static void zbufshade_sss_free ( RenderPart *  pa) [static]
void zbufshade_sss_tile ( RenderPart *  pa)
void zbufshade_tile ( RenderPart *  pa)
void zbufshadeDA_tile ( RenderPart *  pa)

Variable Documentation

struct Render R

Definition at line 127 of file pipeline.c.