Blender V2.61 - r43446
|
Go to the source code of this file.
Classes | |
struct | ShadeSample |
Defines | |
#define | RE_MAX_OSA 16 |
Typedefs | |
typedef struct ShadeSample | ShadeSample |
Functions | |
void | shade_material_loop (struct ShadeInput *shi, struct ShadeResult *shr) |
void | shade_volume_loop (struct ShadeInput *shi, struct ShadeResult *shr) |
void | shade_input_set_triangle_i (struct ShadeInput *shi, struct ObjectInstanceRen *obi, struct VlakRen *vlr, short i1, short i2, short i3) |
void | shade_input_set_triangle (struct ShadeInput *shi, volatile int obi, volatile int facenr, int normal_flip) |
void | shade_input_copy_triangle (struct ShadeInput *shi, struct ShadeInput *from) |
void | shade_input_calc_viewco (struct ShadeInput *shi, float x, float y, float z, float view[3], float *dxyview, float *co, float *dxco, float *dyco) |
void | shade_input_set_viewco (struct ShadeInput *shi, float x, float y, float sx, float sy, float z) |
void | shade_input_set_uv (struct ShadeInput *shi) |
void | shade_input_set_normals (struct ShadeInput *shi) |
void | shade_input_set_vertex_normals (struct ShadeInput *shi) |
void | shade_input_flip_normals (struct ShadeInput *shi) |
void | shade_input_set_shade_texco (struct ShadeInput *shi) |
void | shade_input_set_strand (struct ShadeInput *shi, struct StrandRen *strand, struct StrandPoint *spoint) |
void | shade_input_set_strand_texco (struct ShadeInput *shi, struct StrandRen *strand, struct StrandVert *svert, struct StrandPoint *spoint) |
void | shade_input_do_shade (struct ShadeInput *shi, struct ShadeResult *shr) |
void | shade_input_init_material (struct ShadeInput *shi) |
void | shade_input_initialize (struct ShadeInput *shi, struct RenderPart *pa, struct RenderLayer *rl, int sample) |
void | shade_sample_initialize (struct ShadeSample *ssamp, struct RenderPart *pa, struct RenderLayer *rl) |
void | shade_samples_do_AO (struct ShadeSample *ssamp) |
void | shade_samples_fill_with_ps (struct ShadeSample *ssamp, struct PixStr *ps, int x, int y) |
int | shade_samples (struct ShadeSample *ssamp, struct PixStr *ps, int x, int y) |
void | vlr_set_uv_indices (struct VlakRen *vlr, int *i1, int *i2, int *i3) |
void | calc_R_ref (struct ShadeInput *shi) |
void | shade_lamp_loop (struct ShadeInput *shi, struct ShadeResult *shr) |
void | shade_color (struct ShadeInput *shi, ShadeResult *shr) |
void | ambient_occlusion (struct ShadeInput *shi) |
void | environment_lighting_apply (struct ShadeInput *shi, struct ShadeResult *shr) |
ListBase * | get_lights (struct ShadeInput *shi) |
float | lamp_get_visibility (struct LampRen *lar, const float co[3], float lv[3], float *dist) |
void | lamp_get_shadow (struct LampRen *lar, ShadeInput *shi, float inp, float shadfac[4], int do_real) |
float | fresnel_fac (float *view, float *vn, float fresnel, float fac) |
void | shade_ray (struct Isect *is, struct ShadeInput *shi, struct ShadeResult *shr) |
Definition in file shading.h.
#define RE_MAX_OSA 16 |
Definition at line 43 of file shading.h.
Referenced by atm_tile(), compress_deepshadowbuf(), convert_to_key_alpha(), halo_tile(), lamphalo_tile(), ray_shadow_qmc(), reset_sky_speed(), sky_tile(), and zbuffer_transp_shade().
typedef struct ShadeSample ShadeSample |
void ambient_occlusion | ( | struct ShadeInput * | shi | ) |
Definition at line 1031 of file shadeoutput.c.
References Material::amb, ShadeInput::ao, ShadeInput::env, ShadeInput::mat, R, R_RAYTRACE, ray_ao(), sample_occ(), and WO_AOGATHER_APPROX.
Referenced by bake_shade(), shade_lamp_loop(), and shade_samples_do_AO().
void calc_R_ref | ( | struct ShadeInput * | shi | ) |
Definition at line 815 of file shadeoutput.c.
References ShadeInput::dxno, ShadeInput::dxref, ShadeInput::dxview, ShadeInput::dyno, ShadeInput::dyref, ShadeInput::dyview, VlakRen::flag, i, ShadeInput::osatex, R_SMOOTH, ShadeInput::ref, ShadeInput::view, ShadeInput::vlr, and ShadeInput::vn.
Referenced by do_material_tex().
void environment_lighting_apply | ( | struct ShadeInput * | shi, |
struct ShadeResult * | shr | ||
) |
Definition at line 1073 of file shadeoutput.c.
References ShadeInput::amb, ShadeInput::b, ShadeResult::combined, ShadeInput::env, ShadeInput::g, ShadeInput::r, R, R_RAYTRACE, ShadeInput::refl, and WO_AOGATHER_APPROX.
Referenced by bake_shade(), and shade_lamp_loop().
float fresnel_fac | ( | float * | view, |
float * | vn, | ||
float | fresnel, | ||
float | fac | ||
) |
Definition at line 406 of file shadeoutput.c.
Referenced by Fresnel_Diff(), ray_trace(), shade_color(), shade_lamp_loop(), and traceray().
ListBase* get_lights | ( | struct ShadeInput * | shi | ) |
Definition at line 66 of file shadeoutput.c.
References Group::gobject, Material::group, ShadeInput::light_override, ShadeInput::mat, R, and R_PREVIEWBUTS.
Referenced by renderspothalo(), shade_lamp_loop(), shade_lamp_loop_only_shadow(), and vol_get_scattering().
void lamp_get_shadow | ( | struct LampRen * | lar, |
ShadeInput * | shi, | ||
float | inp, | ||
float | shadfac[4], | ||
int | do_real | ||
) |
Definition at line 1102 of file shadeoutput.c.
References LampRen::buftype, ShadeInput::co, copy_v4_v4(), ShadeInput::depth, ShadeInput::dxco, ShadeInput::dyco, ISB_getshadow(), LA_SHAD_RAY, LA_SHADBUF_IRREGULAR, Material::lbias, ShadeInput::mat, LampRen::mode, R, ray_shadow(), LampShadowSample::s, ShadeInput::sample, LampShadowSubSample::samplenr, ShadeInput::samplenr, LampShadowSubSample::shadfac, LampRen::shadsamp, LampRen::shb, testshadowbuf(), and ShadeInput::thread.
Referenced by shade_lamp_loop_only_shadow(), and shade_one_light().
float lamp_get_visibility | ( | struct LampRen * | lar, |
const float | co[3], | ||
float | lv[3], | ||
float * | dist | ||
) |
Definition at line 1131 of file shadeoutput.c.
References LampRen::co, copy_v3_v3(), LampRen::curfalloff, curvemapping_evaluateF(), LampRen::dist, LampRen::distkw, dot_v3v3(), fabs(), LampRen::falloff_type, i, LampRen::imat, LA_AREA, LA_FALLOFF_CONSTANT, LA_FALLOFF_CURVE, LA_FALLOFF_INVLINEAR, LA_FALLOFF_INVSQUARE, LA_FALLOFF_SLIDERS, LA_HEMI, LA_SPHERE, LA_SPOT, LA_SQUARE, LA_SUN, LampRen::ld1, LampRen::ld2, MAX2, LampRen::mode, mul_m3_v3(), mul_v3_fl(), LampRen::spotbl, LampRen::spotsi, sqrt(), sqrtf, sub_v3_v3v3(), LampRen::type, and LampRen::vec.
void shade_color | ( | struct ShadeInput * | shi, |
ShadeResult * | shr | ||
) |
Definition at line 863 of file shadeoutput.c.
References ShadeResult::alpha, ShadeInput::alpha, ShadeInput::b, ShadeResult::diff, do_material_tex(), fresnel_fac(), Material::fresnel_tra, Material::fresnel_tra_i, ShadeInput::g, MA_FACETEXTURE, MA_FACETEXTURE_ALPHA, MA_TRANSP, MA_VERTEXCOLP, ShadeInput::mat, Material::mode, ShadeInput::mode, ShadeInput::r, R, Material::texco, ShadeInput::vcol, ShadeInput::view, and ShadeInput::vn.
Referenced by shade_ray().
void shade_input_calc_viewco | ( | struct ShadeInput * | shi, |
float | x, | ||
float | y, | ||
float | z, | ||
float | view[3], | ||
float * | dxyview, | ||
float * | co, | ||
float * | dxco, | ||
float * | dyco | ||
) |
Referenced by ray_shadow_jittered_coords(), and shade_input_set_viewco().
void shade_input_copy_triangle | ( | struct ShadeInput * | shi, |
struct 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 | ( | struct ShadeInput * | shi, |
struct ShadeResult * | shr | ||
) |
Definition at line 156 of file shadeinput.c.
References ShadeResult::alpha, ShadeInput::co, ShadeResult::combined, copy_v3_v3(), copy_v4_v4(), len_v3(), MA_NOMIST, MA_TYPE_VOLUME, ShadeInput::mat, Material::material_type, ShadeResult::mist, mistfactor(), Material::mode, mul_v3_fl(), Material::nodetree, ShadeResult::nor, ntreeShaderExecTree(), ShadeInput::passflag, R, R_ORTHO, R_RAYTRACE, RE_RC_MERGE, SCE_PASS_MIST, SCE_PASS_NORMAL, SCE_PASS_VECTOR, shade_input_init_material(), shade_material_loop(), shade_volume_outside(), ShadeInput::thread, Material::use_nodes, ShadeInput::vn, ShadeInput::winspeed, ShadeResult::winspeed, WO_MIST, and ShadeResult::z.
Referenced by shade_samples(), shade_tra_samples(), and strand_shade_point().
void shade_input_flip_normals | ( | struct ShadeInput * | shi | ) |
Definition at line 870 of file shadeinput.c.
References ShadeInput::facenor, ShadeInput::flippednor, ShadeInput::nmapnorm, ShadeInput::vn, and ShadeInput::vno.
Referenced by bake_set_shade_input(), occ_shade(), shade_input_set_normals(), and shade_sample_sss().
void shade_input_init_material | ( | struct ShadeInput * | shi | ) |
Definition at line 96 of file shadeinput.c.
References Material::har, ShadeInput::har, ShadeInput::mat, ShadeInput::r, and Material::r.
Referenced by bake_shade(), shade_input_do_shade(), shade_material_loop(), shade_ray(), shade_sample_sss(), and strand_shade_point().
void shade_input_initialize | ( | struct ShadeInput * | shi, |
struct RenderPart * | pa, | ||
struct RenderLayer * | rl, | ||
int | sample | ||
) |
Definition at line 1330 of file shadeinput.c.
References ShadeInput::combinedflag, ShadeInput::do_manage, ShadeInput::do_preview, ShadeInput::lay, RenderLayer::lay, RenderLayer::layflag, ShadeInput::layflag, RenderLayer::light_override, ShadeInput::light_override, ShadeInput::mat_override, RenderLayer::mat_override, RenderLayer::pass_xor, ShadeInput::passflag, RenderLayer::passflag, R, R_COLOR_MANAGEMENT, R_MATNODE_PREVIEW, ShadeInput::sample, ShadeInput::thread, and RenderPart::thread.
Referenced by lamphalo_tile(), and shade_sample_initialize().
void shade_input_set_normals | ( | struct ShadeInput * | shi | ) |
Definition at line 790 of file shadeinput.c.
References copy_v3_v3(), dot_v3v3(), ShadeInput::facenor, VlakRen::flag, ShadeInput::flippednor, ShadeInput::n1, ShadeInput::n2, ShadeInput::n3, negate_v3(), ShadeInput::nmapnorm, normalize_v3(), R_SMOOTH, R_TANGENT, shade_input_flip_normals(), ShadeInput::u, ShadeInput::v, ShadeInput::view, ShadeInput::vlr, ShadeInput::vn, and ShadeInput::vno.
Referenced by bake_set_shade_input(), occ_shade(), shade_ray(), shade_sample_sss(), shade_samples_fill_with_ps(), and shade_tra_samples_fill().
void shade_input_set_shade_texco | ( | struct 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 | ( | struct ShadeInput * | shi, |
struct StrandRen * | strand, | ||
struct StrandPoint * | spoint | ||
) |
Definition at line 331 of file shadeinput.c.
References StrandRen::buffer, ShadeInput::co, StrandPoint::co, copy_v3_v3(), cross(), cross_v3_v3v3(), dot_v3v3(), StrandPoint::dsco, StrandPoint::dtco, ShadeInput::dxco, ShadeInput::dyco, ShadeInput::facenor, StrandBuffer::ma, MA_TANGENT_STR, ShadeInput::mat, ShadeInput::mat_override, Material::mode, ShadeInput::mode, Material::mode_l, negate_v3(), StrandPoint::nor, normalize_v3(), ShadeInput::osatex, R, R_SHADOW, StrandPoint::tan, Material::texco, TEXCO_OSA, ShadeInput::view, ShadeInput::vn, ShadeInput::vno, StrandPoint::x, ShadeInput::xs, StrandPoint::y, and ShadeInput::ys.
Referenced by strand_shade_point().
void shade_input_set_strand_texco | ( | struct ShadeInput * | shi, |
struct StrandRen * | strand, | ||
struct StrandVert * | svert, | ||
struct 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, ShadeInput::col, ShadeInputCol::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(), Render::name, ShadeInputUV::name, ShadeInputCol::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, ShadeInput::strandco, StrandPoint::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 | ( | struct ShadeInput * | shi, |
volatile int | obi, | ||
volatile int | facenr, | ||
int | normal_flip | ||
) |
Referenced by shade_samples_fill_with_ps(), and shade_tra_samples_fill().
void shade_input_set_triangle_i | ( | struct ShadeInput * | shi, |
struct ObjectInstanceRen * | obi, | ||
struct VlakRen * | vlr, | ||
short | i1, | ||
short | i2, | ||
short | i3 | ||
) |
Definition at line 257 of file shadeinput.c.
References copy_v3_v3(), ShadeInput::facenor, ObjectInstanceRen::flag, VlakRen::flag, ShadeInput::flippednor, ShadeInput::i1, ShadeInput::i2, ShadeInput::i3, ShadeInput::mat, VlakRen::mat, ShadeInput::mat_override, ShadeInput::mode, Material::mode_l, mul_m3_v3(), VertRen::n, ShadeInput::n1, ShadeInput::n2, ShadeInput::n3, ObjectInstanceRen::nmat, normalize_v3(), ShadeInput::obi, ObjectInstanceRen::obr, ShadeInput::obr, ShadeInput::osatex, R, R_SMOOTH, R_TRANSFORMED, RE_vlakren_get_normal(), Material::texco, TEXCO_OSA, ShadeInput::v1, VlakRen::v1, ShadeInput::v2, ShadeInput::v3, and ShadeInput::vlr.
Referenced by bake_set_shade_input(), occ_shade(), shade_input_set_triangle(), shade_ray(), and shade_sample_sss().
void shade_input_set_uv | ( | struct ShadeInput * | shi | ) |
Definition at line 718 of file shadeinput.c.
References axis_dominant_v3(), CLAMP(), VertRen::co, ShadeInput::co, copy_v3_v3(), ShadeInput::dx_u, ShadeInput::dx_v, ShadeInput::dxco, ShadeInput::dy_u, ShadeInput::dy_v, ShadeInput::dyco, ShadeInput::facenor, ObjectInstanceRen::flag, VlakRen::flag, len_v3v3(), ObjectInstanceRen::mat, ShadeInput::mat, mul_m4_v3(), NEED_UV, ShadeInput::obi, ShadeInput::osatex, ShadeInput::passflag, R_SMOOTH, R_TRANSFORMED, SCE_PASS_UV, Material::texco, ShadeInput::u, ShadeInput::v, ShadeInput::v1, ShadeInput::v2, VlakRen::v2, ShadeInput::v3, VlakRen::v3, and ShadeInput::vlr.
Referenced by bake_set_shade_input(), shade_sample_sss(), shade_samples_fill_with_ps(), and shade_tra_samples_fill().
void shade_input_set_vertex_normals | ( | struct ShadeInput * | shi | ) |
Definition at line 840 of file shadeinput.c.
References copy_v3_v3(), ShadeInput::facenor, VlakRen::flag, ShadeInput::n1, ShadeInput::n2, ShadeInput::n3, ShadeInput::nmapnorm, normalize_v3(), R_SMOOTH, ShadeInput::u, ShadeInput::v, ShadeInput::vlr, ShadeInput::vn, and ShadeInput::vno.
Referenced by shade_samples_fill_with_ps(), and shade_tra_samples_fill().
void shade_input_set_viewco | ( | struct ShadeInput * | shi, |
float | x, | ||
float | y, | ||
float | sx, | ||
float | sy, | ||
float | z | ||
) |
Definition at line 692 of file shadeinput.c.
References ShadeInput::co, ShadeInput::dxco, ShadeInput::dxview, ShadeInput::dyco, ShadeInput::mat, NULL, ShadeInput::osatex, R, R_SHADOW, ShadeInput::scanco, shade_input_calc_viewco(), Material::texco, TEXCO_REFL, ShadeInput::view, ShadeInput::xs, and ShadeInput::ys.
Referenced by shade_sample_sss(), shade_samples_fill_with_ps(), and shade_tra_samples_fill().
void shade_lamp_loop | ( | struct ShadeInput * | shi, |
struct ShadeResult * | shr | ||
) |
Definition at line 1645 of file shadeoutput.c.
References add_v3_v3(), ShadeResult::alpha, ShadeInput::alpha, ShadeInput::ambb, ShadeInput::ambg, ambient_occlusion(), ambient_occlusion_apply(), ShadeInput::ambr, ShadeResult::ao, ShadeInput::ao, ShadeInput::b, CLAMP(), ShadeInput::co, Object::col, ShadeResult::col, ShadeResult::combined, ShadeInput::combinedflag, copy_v3_v3(), copy_v4_v4(), ShadeInput::depth, ShadeResult::diff, do_material_tex(), ShadeInput::emit, ShadeResult::emit, ShadeInput::env, ShadeResult::env, environment_lighting_apply(), ListBase::first, fresnel_fac(), Material::fresnel_tra, Material::fresnel_tra_i, ShadeInput::g, get_lights(), ShadeResult::indirect, ShadeInput::indirect, indirect_lighting_apply(), LA_LAYER, LA_YF_PHOTON, GroupObject::lampren, ShadeInput::lay, LampRen::lay, ObjectInstanceRen::lay, Render::lights, MA_DIFF_SSS, MA_FACETEXTURE, MA_FACETEXTURE_ALPHA, MA_OBCOLOR, MA_ONLYSHADOW, MA_RAMP_COL, MA_RAMP_SPEC, MA_RAYTRANSP, MA_SHLESS, MA_TRANSP, MA_VERTEXCOL, MA_VERTEXCOLP, MA_ZTRANSP, ShadeInput::mat, MAX3(), ShadeInput::mirb, ShadeInput::mirg, ShadeInput::mirr, LampRen::mode, Material::mode, ShadeInput::mode, mul_v3_fl(), GroupObject::next, NULL, ObjectRen::ob, ShadeInput::obi, ShadeInput::obr, ShadeInput::passflag, pow(), ShadeInput::r, R, R_SHADOW, ramp_diffuse_result(), ramp_spec_result(), ShadeInput::refcol, ShadeResult::refl, Render::result, sample_sss(), SCE_PASS_AO, SCE_PASS_COMBINED, SCE_PASS_DIFFUSE, SCE_PASS_EMIT, SCE_PASS_ENVIRONMENT, SCE_PASS_INDIRECT, SCE_PASS_REFLECT, SCE_PASS_RGBA, SCE_PASS_SHADOW, SCE_PASS_SPEC, ShadeResult::shad, Material::shade_flag, shade_lamp_loop_only_shadow(), shade_one_light(), ShadeResult::spec, ShadeInput::spectra, Material::sss_flag, sss_pass_done(), Material::sss_texfac, sub_v3_v3v3(), Material::texco, LampRen::type, ShadeInput::vcol, ShadeInput::view, ShadeInput::vn, ShadeInput::volume_depth, WO_AMB_OCC, WO_ENV_LIGHT, WO_INDIRECT_LIGHT, and wrld_exposure_correct().
Referenced by shade_material_loop().
void shade_material_loop | ( | struct ShadeInput * | shi, |
struct ShadeResult * | shr | ||
) |
Definition at line 105 of file shadeinput.c.
References ShadeResult::alpha, ShadeResult::combined, ShadeInput::depth, ShadeResult::diff, ShadeInput::facenor, ShadeInput::layflag, MA_RAYTRANSP, MA_TRANSP, ShadeInput::mode, negate_v3(), negate_v3_v3(), ShadeInput::passflag, R, R_ADDSKY, R_RAYTRACE, ShadeInput::ray_mirror, ray_trace(), SCE_LAY_SKY, SCE_PASS_DIFFUSE, SCE_PASS_SHADOW, SCE_PASS_SPEC, ShadeResult::shad, shade_input_init_material(), shade_lamp_loop(), shade_volume_inside(), ShadeResult::spec, ShadeInput::translucency, VECADDISFAC, ShadeInput::vn, ShadeInput::vno, and ShadeInput::volume_depth.
Referenced by bake_shade(), occ_shade(), RE_Database_Baking(), RE_Database_FromScene(), shade_input_do_shade(), shade_ray(), and shade_sample_sss().
void shade_ray | ( | struct Isect * | is, |
struct ShadeInput * | shi, | ||
struct ShadeResult * | shr | ||
) |
Definition at line 529 of file rayshade.c.
References ShadeInput::co, ShadeResult::combined, copy_v3_v3(), ShadeResult::diff, Isect::dir, Isect::dist, ShadeInput::dx_u, ShadeInput::dx_v, ShadeInput::dy_u, ShadeInput::dy_v, ELEM, Isect::face, Isect::hit, Isect::isect, MA_TYPE_VOLUME, ShadeInput::mat, Material::material_type, Isect::mode, ShadeInput::nodes, Material::nodetree, normalize_v3(), ntreeShaderExecTree(), Isect::ob, ShadeInput::obi, ObjectInstanceRen::obr, ShadeInput::obr, ShadeInput::osatex, RE_RAY_SHADOW, RE_RAY_SHADOW_TRA, shade_color(), shade_input_init_material(), shade_input_set_normals(), shade_input_set_shade_texco(), shade_input_set_triangle_i(), shade_material_loop(), shade_ray_set_derivative(), shade_volume_outside(), shade_volume_shadow(), ShadeResult::spec, Isect::start, sub_v3_v3v3(), Isect::u, ShadeInput::u, Material::use_nodes, Isect::v, ShadeInput::v, ShadeInput::view, and ShadeInput::vlr.
Referenced by ray_trace_shadow_rad(), ray_trace_shadow_tra(), shade_intersection(), and traceray().
void shade_sample_initialize | ( | struct ShadeSample * | ssamp, |
struct RenderPart * | pa, | ||
struct RenderLayer * | rl | ||
) |
Definition at line 1351 of file shadeinput.c.
References get_sample_layers(), R, ShadeSample::rlpp, shade_input_initialize(), ShadeSample::shi, and ShadeSample::shr.
Referenced by shadeDA_tile(), zbuffer_transp_shade(), zbufshade_sss_tile(), and zbufshade_tile().
int shade_samples | ( | struct ShadeSample * | ssamp, |
struct PixStr * | ps, | ||
int | x, | ||
int | y | ||
) |
Definition at line 1454 of file shadeinput.c.
References ShadeInput::passflag, SCE_PASS_INDEXMA, SCE_PASS_INDEXOB, SCE_PASS_Z, shade_input_do_shade(), shade_input_set_shade_texco(), shade_samples_do_AO(), shade_samples_fill_with_ps(), ShadeSample::shi, ShadeSample::shr, ShadeSample::tot, and ShadeResult::z.
Referenced by shadeDA_tile(), and zbufshade_tile().
void shade_samples_do_AO | ( | struct ShadeSample * | ssamp | ) |
Definition at line 1366 of file shadeinput.c.
References ambient_occlusion(), ShadeInput::combinedflag, MA_SHLESS, ShadeInput::mode, ShadeInput::passflag, R, R_RAYTRACE, R_SHADOW, SCE_PASS_AO, SCE_PASS_COMBINED, SCE_PASS_ENVIRONMENT, SCE_PASS_INDIRECT, ShadeSample::shi, ShadeSample::tot, WO_AMB_OCC, WO_AOGATHER_APPROX, WO_ENV_LIGHT, and WO_INDIRECT_LIGHT.
Referenced by bake_shade(), shade_sample_sss(), shade_samples(), shade_tra_samples(), and strand_shade_point().
void shade_samples_fill_with_ps | ( | struct ShadeSample * | ssamp, |
struct PixStr * | ps, | ||
int | x, | ||
int | y | ||
) |
Definition at line 1386 of file shadeinput.c.
References PixStr::facenr, VlakRen::flag, ShadeInput::mask, PixStr::mask, PixStr::next, PixStr::obi, R, R_FULL_OSA, ShadeInput::samplenr, shade_input_copy_triangle(), shade_input_set_normals(), shade_input_set_triangle(), shade_input_set_uv(), shade_input_set_vertex_normals(), shade_input_set_viewco(), ShadeSample::shi, ShadeInput::thread, ShadeSample::tot, ShadeInput::vlr, and PixStr::z.
Referenced by cache_occ_samples(), and shade_samples().
void shade_volume_loop | ( | struct ShadeInput * | shi, |
struct ShadeResult * | shr | ||
) |
void vlr_set_uv_indices | ( | struct VlakRen * | vlr, |
int * | i1, | ||
int * | i2, | ||
int * | i3 | ||
) |
Definition at line 233 of file shadeinput.c.
References VlakRen::flag, R_DIVIDE_24, and R_FACE_SPLIT.
Referenced by compatible_bump_uv_derivs(), shade_input_set_shade_texco(), and shade_tface().