Blender V2.61 - r43446
|
#include "render_types.h"
Go to the source code of this file.
Classes | |
struct | PixStr |
struct | PixStrMain |
Defines | |
#define | CROSS(dest, a, b) { dest[0]= a[1] * b[2] - a[2] * b[1]; dest[1]= a[2] * b[0] - a[0] * b[2]; dest[2]= a[0] * b[1] - a[1] * b[0]; } |
Typedefs | |
typedef struct PixStr | PixStr |
typedef struct PixStrMain | PixStrMain |
Functions | |
void | calc_view_vector (float *view, float x, float y) |
float | mistfactor (float zcor, const float co[3]) |
void | renderspothalo (struct ShadeInput *shi, float col[4], float alpha) |
void | add_halo_flare (Render *re) |
void | calc_renderco_zbuf (float co[3], const float view[3], int z) |
void | calc_renderco_ortho (float co[3], float x, float y, int z) |
int | count_mask (unsigned short mask) |
void | zbufshade (void) |
void | zbufshadeDA (void) |
void | zbufshade_tile (struct RenderPart *pa) |
void | zbufshadeDA_tile (struct RenderPart *pa) |
void | zbufshade_sss_tile (struct RenderPart *pa) |
int | get_sample_layers (struct RenderPart *pa, struct RenderLayer *rl, struct RenderLayer **rlpp) |
void | freeraytree (Render *re) |
void | makeraytree (Render *re) |
struct RayObject * | makeraytree_object (Render *re, ObjectInstanceRen *obi) |
void | ray_shadow (ShadeInput *shi, LampRen *lar, float shadfac[4]) |
void | ray_trace (ShadeInput *shi, ShadeResult *) |
void | ray_ao (ShadeInput *shi, float ao[3], float env[3]) |
void | init_jitter_plane (LampRen *lar) |
void | init_ao_sphere (struct World *wrld) |
void | init_render_qmcsampler (Render *re) |
void | free_render_qmcsampler (Render *re) |
Definition in file rendercore.h.
#define CROSS | ( | dest, | |
a, | |||
b | |||
) | { dest[0]= a[1] * b[2] - a[2] * b[1]; dest[1]= a[2] * b[0] - a[0] * b[2]; dest[2]= a[0] * b[1] - a[1] * b[0]; } |
Definition at line 44 of file rendercore.h.
Referenced by area_lamp_energy().
typedef struct PixStrMain PixStrMain |
void add_halo_flare | ( | Render * | re | ) |
Definition at line 1933 of file rendercore.c.
References Render::ddh, Render::display_draw, ListBase::first, HaloRen::flarec, RenderResult::layers, RenderLayer::layflag, RenderLayer::next, NULL, project_renderdata(), projectverto(), R, R_PANORAMA, RenderLayer::rectf, renderflare(), RenderResult::renlay, Render::result, and SCE_LAY_HALO.
Referenced by do_render_3d().
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 | ||
) |
Definition at line 95 of file rendercore.c.
References ABS, R, R_ORTHO, and R_PANORAMA.
Referenced by lamphalo_tile(), shade_input_calc_viewco(), shade_sample_sss(), shadeAtmPixel(), shadeSkyPixel(), and viewpixel_to_lampbuf().
int count_mask | ( | unsigned short | mask | ) |
Definition at line 158 of file rendercore.c.
References R.
Referenced by add_filt_passes(), addAlphaOverFloatMask(), halo_pixelstruct(), isb_make_buffer(), isb_make_buffer_transp(), lamphalo_tile(), and ray_shadow_jittered_coords().
void free_render_qmcsampler | ( | Render * | re | ) |
Definition at line 1237 of file rayshade.c.
References BLENDER_MAX_THREADS, ListBase::first, ListBase::last, MEM_freeN(), QMCSampler::next, next, NULL, QMC_freeSampler(), and Render::qmcsamplers.
Referenced by RE_Database_Free().
void freeraytree | ( | Render * | re | ) |
Definition at line 147 of file rayshade.c.
References BLENDER_MAX_THREADS, ListBase::first, i, Render::instancetable, MEM_freeN(), ObjectInstanceRen::next, NULL, ObjectInstanceRen::obr, ObjectRen::rayfaces, Render::rayfaces, Render::rayprimitives, ObjectInstanceRen::raytree, ObjectRen::raytree, Render::raytree, RE_rayobject_free(), RE_RC_INFO, RE_RC_MERGE, and sum().
Referenced by makeraytree(), and RE_Database_Free().
int get_sample_layers | ( | struct RenderPart * | pa, |
struct RenderLayer * | rl, | ||
struct RenderLayer ** | rlpp | ||
) |
Definition at line 652 of file rendercore.c.
References BLI_findindex(), BLI_findlink(), ListBase::first, RenderPart::fullresult, RenderResult::layers, R, and RenderPart::result.
Referenced by atm_tile(), convert_to_key_alpha(), halo_tile(), lamphalo_tile(), reset_sky_speed(), shade_sample_initialize(), sky_tile(), and zbuffer_transp_shade().
void init_ao_sphere | ( | struct World * | wrld | ) |
Definition at line 1792 of file rayshade.c.
References World::aosamp, World::aosphere, World::aotables, BLENDER_MAX_THREADS, BLI_srandom(), DS_energy(), MEM_mallocN(), RandomSpherical(), and QMCSampler::tot.
Referenced by RE_Database_Baking(), and RE_Database_FromScene().
void init_jitter_plane | ( | LampRen * | lar | ) |
Definition at line 947 of file rayshade.c.
References LampRen::area_size, LampRen::area_sizey, BLENDER_MAX_THREADS, BLI_frand(), BLI_srandom(), DP_energy(), LampRen::jitter, jitter_plane_offset(), MEM_callocN(), and LampRen::ray_totsamp.
Referenced by add_render_lamp().
void init_render_qmcsampler | ( | Render * | re | ) |
Definition at line 1206 of file rayshade.c.
References BLENDER_MAX_THREADS, MEM_callocN(), and Render::qmcsamplers.
Referenced by RE_Database_Baking(), and RE_Database_FromScene().
void makeraytree | ( | Render * | re | ) |
Definition at line 439 of file rayshade.c.
References freeraytree(), Render::i, i, RenderStats::infostr, INIT_MINMAX, makeraytree_single(), max, Render::maxdist, min, Render::r, R_RAYSTRUCTURE_OCTREE, R_RAYTRACE_USE_INSTANCES, R_RAYTRACE_USE_LOCAL_COORDS, RenderData::raytrace_options, RenderData::raytrace_structure, Render::raytree, RE_rayobject_merge_bb(), Render::sdh, sqrt(), Render::stats_draw, and test_break().
Referenced by RE_Database_Baking(), and RE_Database_FromScene().
struct RayObject* makeraytree_object | ( | Render * | re, |
ObjectInstanceRen * | obi | ||
) | [read] |
Definition at line 227 of file rayshade.c.
References ObjectInstanceRen::flag, is_raytraceable_vlr(), ObjectInstanceRen::mat, MEM_callocN(), NULL, ObjectInstanceRen::obr, Render::r, R_RAYTRACE_USE_LOCAL_COORDS, R_TRANSFORMED, ObjectRen::rayfaces, ObjectRen::rayobi, ObjectRen::rayprimitives, RenderData::raytrace_options, RenderData::raytrace_structure, ObjectRen::raytree, Render::raytree, ObjectInstanceRen::raytree, RE_rayface_from_vlak(), RE_rayobject_add(), RE_rayobject_create(), RE_rayobject_done(), RE_rayobject_free(), RE_rayobject_instance_create(), RE_rayobject_unalignRayFace, RE_vlakprimitive_from_vlak(), test_break(), ObjectRen::totvlak, ObjectInstanceRen::transform_primitives, VlakTableNode::vlak, and ObjectRen::vlaknodes.
Referenced by makeraytree_single(), point_inside_volume_objectinstance(), and vol_precache_objectinstance_threads().
float mistfactor | ( | float | zcor, |
const float | co[3] | ||
) |
Definition at line 122 of file shadeoutput.c.
Referenced by shade_input_do_shade(), shadeHaloFloat(), and spothalo().
void ray_ao | ( | ShadeInput * | shi, |
float | ao[3], | ||
float | env[3] | ||
) |
Definition at line 2169 of file rayshade.c.
References ELEM, R, ray_ao_qmc(), ray_ao_spheresamp(), WO_AOSAMP_CONSTANT, WO_AOSAMP_HALTON, and WO_AOSAMP_HAMMERSLEY.
Referenced by ambient_occlusion().
void ray_shadow | ( | ShadeInput * | shi, |
LampRen * | lar, | ||
float | shadfac[4] | ||
) |
Definition at line 2477 of file rayshade.c.
References LampRen::co, ShadeInput::co, copy_v3_v3(), copy_v4_v4(), ShadeInput::depth, DEPTH_SHADOW_TRA, Isect::dir, Isect::dist, ELEM, Isect::face, Isect::hint, LA_HEMI, LA_LAYER, LA_LAYER_SHADOW, LA_SAMP_HALTON, LA_SAMP_HAMMERSLEY, LA_SUN, Isect::last_hit, LampRen::last_hit, LampRen::lay, Isect::lay, MA_SHADOW_TRA, ShadeInput::mat, LampRen::mode, Isect::mode, Material::mode, normalize_v3(), NULL, Isect::ob, ShadeInput::obi, Isect::orig, R, LampRen::ray_samp_method, ray_shadow_jitter(), ray_shadow_qmc(), LampRen::ray_totsamp, ray_trace_shadow_tra(), RE_RAY_SHADOW, RE_RAY_SHADOW_TRA, RE_rayobject_raycast(), RE_RC_INIT, Isect::start, sub_v3_v3v3(), ShadeInput::thread, LampRen::type, LampRen::vec, and ShadeInput::vlr.
Referenced by lamp_get_shadow().
void ray_trace | ( | ShadeInput * | shi, |
ShadeResult * | |||
) |
Definition at line 1515 of file rayshade.c.
References add_v3_v3v3(), ShadeResult::alpha, ShadeInput::b, ShadeResult::combined, ShadeInput::combinedflag, copy_v3_v3(), ShadeInput::depth, KDL::diff(), fb(), Material::filter, fresnel_fac(), Material::fresnel_mir, Material::fresnel_mir_i, ShadeInput::g, i, MA_RAYMIRROR, MA_RAYTRANSP, MA_TRANSP, ShadeInput::mat, MIN2, ShadeInput::mirb, ShadeInput::mirg, ShadeInput::mirr, Material::mode, ShadeInput::mode, ShadeInput::passflag, ShadeInput::r, Material::ray_depth, Material::ray_depth_tra, ShadeInput::ray_mirror, ShadeResult::refl, ShadeResult::refr, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_SPEC, ShadeResult::spec, sub_v3_v3v3(), trace_reflect(), trace_refract(), ShadeInput::view, and ShadeInput::vn.
Referenced by shade_material_loop().
void renderspothalo | ( | struct ShadeInput * | shi, |
float | col[4], | ||
float | alpha | ||
) |
Definition at line 347 of file shadeoutput.c.
References LampRen::b, LampRen::buftype, ListBase::first, LampRen::g, get_lights(), LampRen::haint, i, LA_HALO, LA_LAYER, LA_SHADBUF_DEEP, LA_SPOT, GroupObject::lampren, ShadeInput::lay, LampRen::lay, ObjectInstanceRen::lay, Render::lights, LampRen::mode, GroupObject::next, NULL, ShadeInput::obi, LampRen::r, spothalo(), LampRen::type, and ShadeInput::vlr.
Referenced by lamphalo_tile(), shade_tra_samples(), and strand_shade_point().
void zbufshade | ( | void | ) |
void zbufshade_sss_tile | ( | struct RenderPart * | pa | ) |
Definition at line 1600 of file rendercore.c.
References add_v3_v3(), addps_sss(), addpsmain(), BLI_thread_srandom(), co, MakeCursor::color, ShadeInput::combinedflag, display(), RenderPart::disprect, PixStr::facenr, ListBase::first, ISB_create(), ISB_free(), ListBase::last, ShadeInput::lay, RenderLayer::lay, RenderResult::layers, RenderLayer::layflag, ShadeInput::layflag, ShadeInput::light_override, ShadeInput::mat_override, MEM_callocN(), MEM_freeN(), MEM_mallocN(), RenderData::mode, RenderLayer::next, PixStr::next, NULL, PixStr::obi, Render::objectinstance, ObjectInstanceRen::obr, ZBufSSSHandle::pa, RenderLayer::pass_xor, ShadeInput::passflag, RenderLayer::passflag, ZBufSSSHandle::psmlist, R, Render::r, R_PREVIEWBUTS, R_SHADOW, RE_findOrAddVlak(), RE_QUAD_MASK, RE_QUAD_OFFS, RenderPart::rectall, RenderPart::rectbacko, RenderPart::rectbackp, RenderPart::rectbackz, RenderLayer::rectf, RenderPart::recto, RenderPart::rectp, RenderPart::rectx, RenderPart::recty, RenderPart::rectz, render_get_active_layer(), RenderResult::renlay, RenderResult::renrect, RenderPart::result, SCE_PASS_COMBINED, SCE_PASS_RGBA, SCE_PASS_SPEC, RenderData::scemode, shade_sample_initialize(), shade_sample_sss(), ShadeSample::shi, sss_add_points(), Render::sss_mat, Render::tbh, Render::test_break, RenderPart::thread, ShadeSample::tot, ZBufSSSHandle::totps, rcti::xmin, rcti::ymax, rcti::ymin, PixStr::z, zbuffer_sss(), and zbufshade_sss_free().
Referenced by do_part_thread().
void zbufshade_tile | ( | struct RenderPart * | pa | ) |
Definition at line 1305 of file rendercore.c.
References RenderLayer::acolrect, add_passes(), addAlphaOverFloat(), atm_tile(), BLI_thread_srandom(), cache_occ_samples(), convert_to_key_alpha(), RenderPart::disprect, edge_enhance_add(), edge_enhance_tile(), PixStr::facenr, ListBase::first, free_occ_samples(), halo_tile(), ISB_create(), ISB_free(), lamphalo_tile(), RenderResult::layers, RenderLayer::layflag, PixStr::mask, MEM_callocN(), MEM_freeN(), MEM_mallocN(), RenderLayer::next, PixStr::next, NULL, PixStr::obi, offs, RenderLayer::passflag, R, R_ALPHAKEY, R_EDGE, R_HALO, R_LAMPHALO, R_SHADOW, R_ZTRA, RenderLayer::rectf, RenderPart::rectmask, RenderPart::recto, RenderPart::rectp, RenderPart::rectx, RenderPart::recty, RenderPart::rectz, render_get_active_layer(), RenderResult::renlay, RenderResult::renrect, reset_sky_speed(), RenderPart::result, SCE_LAY_EDGE, SCE_LAY_HALO, SCE_LAY_NEG_ZMASK, SCE_LAY_SKY, SCE_LAY_SOLID, SCE_LAY_STRAND, SCE_LAY_ZMASK, SCE_LAY_ZTRA, SCE_PASS_VECTOR, shade_sample_initialize(), shade_samples(), ShadeSample::shi, ShadeSample::shr, sky_tile(), SWAP, RenderPart::thread, rcti::xmin, rcti::ymax, rcti::ymin, PixStr::z, zbuffer_solid(), and zbuffer_transp_shade().
Referenced by do_part_thread().
void zbufshadeDA | ( | void | ) |
void zbufshadeDA_tile | ( | struct RenderPart * | pa | ) |
Definition at line 1161 of file rendercore.c.
References RenderLayer::acolrect, addAlphaOverFloat(), addAlphaOverFloatMask(), addpsmain(), atm_tile(), convert_to_key_alpha(), edge_enhance_add(), ZbufSolidData::edgerect, ListBase::first, freeps(), RenderPart::fullresult, halo_tile(), lamphalo_tile(), RenderResult::layers, RenderLayer::layflag, make_pixelstructs(), make_solid_mask(), MEM_callocN(), MEM_freeN(), MEM_mallocN(), RenderLayer::next, NULL, RenderLayer::passflag, ZbufSolidData::psmlist, R, R_ALPHAKEY, R_EDGE, R_HALO, R_LAMPHALO, R_ZTRA, RenderPart::rectdaps, RenderLayer::rectf, RenderPart::rectmask, RenderPart::recto, RenderPart::rectp, RenderPart::rectx, RenderPart::recty, RenderPart::rectz, render_get_active_layer(), RenderResult::renlay, RenderResult::renrect, reset_sky_speed(), RenderPart::result, ZbufSolidData::rl, RenderPart::sample, SCE_LAY_EDGE, SCE_LAY_HALO, SCE_LAY_NEG_ZMASK, SCE_LAY_SKY, SCE_LAY_SOLID, SCE_LAY_STRAND, SCE_LAY_ZMASK, SCE_LAY_ZTRA, SCE_PASS_VECTOR, shadeDA_tile(), sky_tile(), SWAP, rcti::ymax, rcti::ymin, zbuffer_solid(), and zbuffer_transp_shade().
Referenced by do_part_thread().