Blender V2.61 - r43446
Defines | Functions | Variables

shadeinput.c File Reference

#include <stdio.h>
#include <math.h>
#include <string.h>
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "DNA_curve_types.h"
#include "DNA_group_types.h"
#include "DNA_lamp_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_material_types.h"
#include "BKE_colortools.h"
#include "BKE_node.h"
#include "raycounter.h"
#include "renderpipeline.h"
#include "render_types.h"
#include "renderdatabase.h"
#include "rendercore.h"
#include "shadbuf.h"
#include "shading.h"
#include "strand.h"
#include "texture.h"
#include "volumetric.h"
#include "zbuf.h"

Go to the source code of this file.

Defines

#define VECADDISFAC(v1, v3, fac)   {*(v1)+= *(v3)*(fac); *(v1+1)+= *(v3+1)*(fac); *(v1+2)+= *(v3+2)*(fac);}

Functions

void shade_input_init_material (ShadeInput *shi)
void shade_material_loop (ShadeInput *shi, ShadeResult *shr)
void shade_input_do_shade (ShadeInput *shi, ShadeResult *shr)
void vlr_set_uv_indices (VlakRen *vlr, int *i1, int *i2, int *i3)
void shade_input_set_triangle_i (ShadeInput *shi, ObjectInstanceRen *obi, VlakRen *vlr, short i1, short i2, short i3)
void shade_input_set_triangle (ShadeInput *shi, volatile int obi, volatile int facenr, int UNUSED(normal_flip))
void shade_input_copy_triangle (ShadeInput *shi, ShadeInput *from)
void shade_input_set_strand (ShadeInput *shi, StrandRen *strand, StrandPoint *spoint)
void shade_input_set_strand_texco (ShadeInput *shi, StrandRen *strand, StrandVert *svert, StrandPoint *spoint)
void shade_input_calc_viewco (ShadeInput *shi, float x, float y, float z, float view[3], float dxyview[2], float co[3], float dxco[3], float dyco[3])
void shade_input_set_viewco (ShadeInput *shi, float x, float y, float xs, float ys, float z)
void shade_input_set_uv (ShadeInput *shi)
void shade_input_set_normals (ShadeInput *shi)
void shade_input_set_vertex_normals (ShadeInput *shi)
void shade_input_flip_normals (ShadeInput *shi)
void shade_input_set_shade_texco (ShadeInput *shi)
void shade_input_initialize (ShadeInput *shi, RenderPart *pa, RenderLayer *rl, int sample)
void shade_sample_initialize (ShadeSample *ssamp, RenderPart *pa, RenderLayer *rl)
void shade_samples_do_AO (ShadeSample *ssamp)
void shade_samples_fill_with_ps (ShadeSample *ssamp, PixStr *ps, int x, int y)
int shade_samples (ShadeSample *ssamp, PixStr *ps, int x, int y)

Variables

struct Render R

Detailed Description

Definition in file shadeinput.c.


Define Documentation

#define VECADDISFAC (   v1,
  v3,
  fac 
)    {*(v1)+= *(v3)*(fac); *(v1+1)+= *(v3+1)*(fac); *(v1+2)+= *(v3+2)*(fac);}

Definition at line 70 of file shadeinput.c.

Referenced by shade_material_loop().


Function Documentation

void shade_input_calc_viewco ( ShadeInput shi,
float  x,
float  y,
float  z,
float  view[3],
float  dxyview[2],
float  co[3],
float  dxco[3],
float  dyco[3] 
)
void shade_input_copy_triangle ( ShadeInput shi,
ShadeInput from 
)

Definition at line 324 of file shadeinput.c.

Referenced by shade_samples_fill_with_ps(), and shade_tra_samples_fill().

void shade_input_do_shade ( ShadeInput shi,
ShadeResult shr 
)
void shade_input_flip_normals ( ShadeInput shi)
void shade_input_init_material ( ShadeInput shi)
void shade_input_initialize ( ShadeInput shi,
RenderPart pa,
RenderLayer rl,
int  sample 
)
void shade_input_set_normals ( ShadeInput shi)
void shade_input_set_shade_texco ( ShadeInput shi)

Definition at line 891 of file shadeinput.c.

References VertRen::accum, ShadeInput::actcol, ObjectRen::actmcol, ObjectRen::actmtface, ShadeInput::actuv, VertRen::co, ShadeInput::co, ShadeInputCol::col, ShadeInput::col, copy_m4_m4(), copy_v3_v3(), ShadeInput::depth, ShadeInput::do_manage, ShadeInput::duplilo, ObjectInstanceRen::dupliorco, ObjectInstanceRen::dupliuv, ShadeInput::dupliuv, ShadeInput::dx_u, ShadeInput::dx_v, ShadeInput::dxco, ShadeInput::dxgl, ShadeInput::dxlo, ShadeInput::dxno, ShadeInput::dxsticky, ShadeInput::dxstrand, ShadeInputUV::dxuv, ShadeInput::dxwin, ShadeInput::dy_u, ShadeInput::dy_v, ShadeInput::dyco, ShadeInput::dygl, ShadeInput::dylo, ShadeInput::dyno, ShadeInput::dysticky, ShadeInput::dystrand, ShadeInputUV::dyuv, ShadeInput::dywin, ObjectInstanceRen::flag, VlakRen::flag, ShadeInput::gl, i, ShadeInput::i1, ShadeInput::i2, ShadeInput::i3, ShadeInput::lo, MA_FACETEXTURE, MA_NORMAP_TANG, MA_STR_SURFDIFF, MA_TANGENT_V, MA_VERTEXCOL, MA_VERTEXCOLP, ObjectInstanceRen::mat, ShadeInput::mat, ShadeInput::mode, mul_m3_v3(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), mult_m4_m4m4(), ShadeInput::n1, ShadeInput::n2, ShadeInput::n3, ShadeInputUV::name, ShadeInputCol::name, Render::name, NEED_UV, ShadeInput::nmaptang, ObjectInstanceRen::nmat, normalize_v3(), ShadeInput::obi, ShadeInput::obr, VertRen::orco, ShadeInput::orn, ShadeInput::osatex, ShadeInput::passflag, R, R_NEED_TANGENT, R_SMOOTH, R_SPEED, R_TRANSFORMED, RE_vertren_get_sticky(), RE_vertren_get_stress(), RE_vertren_get_tangent(), RE_vertren_get_winspeed(), RE_vlakren_get_mcol(), RE_vlakren_get_nmap_tangent(), RE_vlakren_get_surfnor(), RE_vlakren_get_tface(), render_realtime_texture(), SCE_PASS_UV, srgb_to_linearrgb_v3_v3(), ShadeInput::sticky, ShadeInput::strandco, ShadeInput::stress, ShadeInput::surfdist, ShadeInput::surfnor, ShadeInput::tang, Material::texco, TEXCO_GLOB, TEXCO_NORM, TEXCO_ORCO, TEXCO_REFL, TEXCO_STICKY, TEXCO_STRAND, TEXCO_STRESS, TEXCO_TANGENT, TEXCO_UV, TEXCO_WINDOW, ShadeInput::totcol, ShadeInput::totuv, MTFace::tpage, ShadeInput::u, ShadeInputUV::uv, MTFace::uv, ShadeInput::uv, ShadeInput::v, ShadeInput::v1, ShadeInput::v2, ShadeInput::v3, ShadeInput::vcol, ShadeInput::vlr, vlr_set_uv_indices(), ShadeInput::vn, ShadeInput::winco, Render::winmat, ShadeInput::winspeed, ShadeInput::xs, ShadeInput::ys, zbuf_make_winmat(), and zbuf_render_project().

Referenced by bake_shade(), do_bake_shade(), occ_shade(), shade_ray(), shade_sample_sss(), shade_samples(), and shade_tra_samples().

void shade_input_set_strand ( ShadeInput shi,
StrandRen strand,
StrandPoint spoint 
)
void shade_input_set_strand_texco ( ShadeInput shi,
StrandRen strand,
StrandVert svert,
StrandPoint spoint 
)

Definition at line 375 of file shadeinput.c.

References ShadeInput::actcol, ObjectRen::actmcol, ObjectRen::actmtface, ShadeInput::actuv, StrandRen::buffer, ShadeInput::co, StrandVert::co, ShadeInputCol::col, ShadeInput::col, copy_v3_v3(), copy_v4_v4(), ShadeInput::depth, ShadeInput::do_manage, StrandPoint::dtstrandco, ShadeInput::dxco, ShadeInput::dxgl, ShadeInput::dxstrand, ShadeInputUV::dxuv, ShadeInput::dxwin, ShadeInput::dyco, ShadeInput::dygl, ShadeInput::dystrand, ShadeInputUV::dyuv, ShadeInput::dywin, ShadeInput::gl, i, len_v3v3(), ShadeInput::lo, MA_FACETEXTURE, MA_NORMAP_TANG, MA_STR_SURFDIFF, MA_TANGENT_V, MA_VERTEXCOL, MA_VERTEXCOLP, ShadeInput::mat, ShadeInput::mode, mul_m4_v3(), mul_mat3_m4_v3(), ShadeInputUV::name, ShadeInputCol::name, Render::name, NEED_UV, ShadeInput::nmaptang, ShadeInput::obi, StrandBuffer::obr, StrandRen::orco, ShadeInput::orn, ShadeInput::osatex, StrandBuffer::overrideuv, R, R_SPEED, RE_strandren_get_mcol(), RE_strandren_get_surfnor(), RE_strandren_get_uv(), RE_strandren_get_winspeed(), srgb_to_linearrgb_v3_v3(), Material::strand_surfnor, StrandPoint::strandco, ShadeInput::strandco, ShadeInput::surfdist, ShadeInput::surfnor, StrandPoint::t, StrandPoint::tan, ShadeInput::tang, Material::texco, TEXCO_GLOB, TEXCO_NORM, TEXCO_ORCO, TEXCO_REFL, TEXCO_STICKY, TEXCO_STRAND, TEXCO_STRESS, TEXCO_TANGENT, TEXCO_UV, TEXCO_WINDOW, ShadeInput::totcol, ShadeInput::totuv, ShadeInputUV::uv, ShadeInput::uv, ShadeInput::vcol, StrandRen::vert, ShadeInput::vn, ShadeInput::winco, ShadeInput::winspeed, StrandPoint::x, and StrandPoint::y.

Referenced by strand_shade_point().

void shade_input_set_triangle ( ShadeInput shi,
volatile int  obi,
volatile int  facenr,
int   UNUSEDnormal_flip 
)
void shade_input_set_triangle_i ( ShadeInput shi,
ObjectInstanceRen obi,
VlakRen vlr,
short  i1,
short  i2,
short  i3 
)
void shade_input_set_uv ( ShadeInput shi)
void shade_input_set_vertex_normals ( ShadeInput shi)
void shade_input_set_viewco ( ShadeInput shi,
float  x,
float  y,
float  xs,
float  ys,
float  z 
)
void shade_material_loop ( ShadeInput shi,
ShadeResult shr 
)
void shade_sample_initialize ( ShadeSample ssamp,
RenderPart pa,
RenderLayer rl 
)
int shade_samples ( ShadeSample ssamp,
PixStr ps,
int  x,
int  y 
)
void shade_samples_do_AO ( ShadeSample ssamp)
void shade_samples_fill_with_ps ( ShadeSample ssamp,
PixStr ps,
int  x,
int  y 
)
void vlr_set_uv_indices ( VlakRen vlr,
int *  i1,
int *  i2,
int *  i3 
)

Variable Documentation

struct Render R

Definition at line 127 of file pipeline.c.