|
Blender
V2.59
|
#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "DNA_material_types.h"#include "BLI_math.h"#include "BLI_blenlib.h"#include "BLI_memarena.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BKE_global.h"#include "BKE_scene.h"#include "RE_shader_ext.h"#include "occlusion.h"#include "render_types.h"#include "rendercore.h"#include "renderdatabase.h"#include "pixelshading.h"#include "shading.h"#include "zbuf.h"Go to the source code of this file.
Classes | |
| struct | OcclusionCacheSample |
| struct | OcclusionCache |
| struct | OccFace |
| struct | OccNode |
| struct | OcclusionTree |
| struct | OcclusionThread |
| struct | OcclusionBuildThread |
Defines | |
| #define | INVALID_INDEX ((int)(~0)) |
| #define | INVPI 0.31830988618379069f |
| #define | TOTCHILD 8 |
| #define | CACHE_STEP 3 |
Typedefs | |
| typedef struct OcclusionCacheSample | OcclusionCacheSample |
| typedef struct OcclusionCache | OcclusionCache |
| typedef struct OccFace | OccFace |
| typedef struct OccNode | OccNode |
| typedef struct OcclusionTree | OcclusionTree |
| typedef struct OcclusionThread | OcclusionThread |
| typedef struct OcclusionBuildThread | OcclusionBuildThread |
Functions | |
| static void | occ_shade (ShadeSample *ssamp, ObjectInstanceRen *obi, VlakRen *vlr, float *rad) |
| static void | occ_build_shade (Render *re, OcclusionTree *tree) |
| static void | sh_copy (float *shresult, float *sh) |
| static void | sh_mul (float *sh, float f) |
| static void | sh_add (float *shresult, float *sh1, float *sh2) |
| static void | sh_from_disc (float *n, float area, float *shresult) |
| static float | sh_eval (float *sh, float *v) |
| static void | occ_face (const OccFace *face, float co[3], float normal[3], float *area) |
| static void | occ_sum_occlusion (OcclusionTree *tree, OccNode *node) |
| static int | occ_find_bbox_axis (OcclusionTree *tree, int begin, int end, float *min, float *max) |
| static void | occ_node_from_face (OccFace *face, OccNode *node) |
| static void | occ_build_dco (OcclusionTree *tree, OccNode *node, const float co[3], float *dco) |
| static void | occ_build_split (OcclusionTree *tree, int begin, int end, int *split) |
| static void | occ_build_8_split (OcclusionTree *tree, int begin, int end, int *offset, int *count) |
| static void | occ_build_recursive (OcclusionTree *tree, OccNode *node, int begin, int end, int depth) |
| static void * | exec_occ_build (void *data) |
| static void | occ_build_sh_normalize (OccNode *node) |
| static OcclusionTree * | occ_tree_build (Render *re) |
| static void | occ_free_tree (OcclusionTree *tree) |
| static float | occ_solid_angle (OccNode *node, float *v, float d2, float invd2, float *receivenormal) |
| static void | VecAddDir (float *result, float *v1, float *v2, float fac) |
| static int | occ_visible_quad (float *p, float *n, float *v0, float *v1, float *v2, float *q0, float *q1, float *q2, float *q3) |
| static void | normalizef (float *n) |
| static float | occ_quad_form_factor (float *p, float *n, float *q0, float *q1, float *q2, float *q3) |
| static float | occ_form_factor (OccFace *face, float *p, float *n) |
| static void | occ_lookup (OcclusionTree *tree, int thread, OccFace *exclude, float *pp, float *pn, float *occ, float rad[3], float bentn[3]) |
| static void | occ_compute_bounces (Render *re, OcclusionTree *tree, int totbounce) |
| static void | occ_compute_passes (Render *re, OcclusionTree *tree, int totpass) |
| static void | sample_occ_tree (Render *re, OcclusionTree *tree, OccFace *exclude, float *co, float *n, int thread, int onlyshadow, float *ao, float *env, float *indirect) |
| static OcclusionCacheSample * | find_occ_sample (OcclusionCache *cache, int x, int y) |
| static int | sample_occ_cache (OcclusionTree *tree, float *co, float *n, int x, int y, int thread, float *ao, float *env, float *indirect) |
| static void | sample_occ_surface (ShadeInput *shi) |
| static void * | exec_strandsurface_sample (void *data) |
| void | make_occ_tree (Render *re) |
| void | free_occ (Render *re) |
| void | sample_occ (Render *re, ShadeInput *shi) |
| void | cache_occ_samples (Render *re, RenderPart *pa, ShadeSample *ssamp) |
| void | free_occ_samples (Render *re, RenderPart *pa) |
Variables | |
| Render | R |
Definition in file occlusion.c.
| #define CACHE_STEP 3 |
Definition at line 70 of file occlusion.c.
Referenced by cache_occ_samples().
| #define INVALID_INDEX ((int)(~0)) |
Definition at line 67 of file occlusion.c.
| #define INVPI 0.31830988618379069f |
Definition at line 68 of file occlusion.c.
Referenced by occ_solid_angle().
| #define TOTCHILD 8 |
Definition at line 69 of file occlusion.c.
Referenced by occ_build_dco(), occ_build_recursive(), occ_build_sh_normalize(), occ_lookup(), occ_sum_occlusion(), and occ_tree_build().
| typedef struct OcclusionBuildThread OcclusionBuildThread |
| typedef struct OcclusionCache OcclusionCache |
| typedef struct OcclusionCacheSample OcclusionCacheSample |
| typedef struct OcclusionThread OcclusionThread |
| typedef struct OcclusionTree OcclusionTree |
| void cache_occ_samples | ( | Render * | re, |
| RenderPart * | pa, | ||
| ShadeSample * | ssamp | ||
| ) |
Definition at line 1809 of file occlusion.c.
References OcclusionCacheSample::ao, ShadeInput::ao, OcclusionTree::cache, CACHE_STEP, OcclusionCacheSample::co, ShadeInput::co, RenderPart::disprect, OcclusionCacheSample::dist2, ShadeInput::dxco, ShadeInput::dyco, OcclusionCacheSample::env, ShadeInput::env, PixStr::facenr, OccFace::facenr, OcclusionCacheSample::filled, OcclusionCache::h, VlakRen::index, OcclusionCacheSample::indirect, ShadeInput::indirect, INPR, OcclusionCacheSample::intensity, MA_ONLYSHADOW, PixStr::mask, ShadeInput::mat, MAX2, MAX3(), MEM_callocN(), Material::mode, OcclusionCacheSample::n, PixStr::next, NULL, PixStr::obi, OccFace::obi, ShadeInput::obi, Render::objectinstance, Render::occlusiontree, Render::osa, RenderPart::rectdaps, RenderPart::recto, RenderPart::rectp, RenderPart::rectx, RenderPart::recty, RenderPart::rectz, OcclusionCache::sample, sample_occ_tree(), shade_samples_fill_with_ps(), ShadeSample::shi, OcclusionCache::step, Render::tbh, Render::test_break, RenderPart::thread, ShadeInput::thread, VECCOPY, ShadeInput::vlr, ShadeInput::vno, OcclusionCache::w, OcclusionCacheSample::x, OcclusionCache::x, rcti::xmax, rcti::xmin, ShadeInput::xs, OcclusionCacheSample::y, OcclusionCache::y, rcti::ymax, rcti::ymin, ShadeInput::ys, and PixStr::z.
Referenced by shadeDA_tile(), and zbufshade_tile().
| static void* exec_occ_build | ( | void * | data | ) | [static] |
Definition at line 519 of file occlusion.c.
References OcclusionBuildThread::begin, OcclusionBuildThread::depth, OcclusionBuildThread::end, OcclusionBuildThread::node, occ_build_recursive(), and OcclusionBuildThread::tree.
Referenced by occ_build_recursive().
| static void* exec_strandsurface_sample | ( | void * | data | ) | [static] |
Definition at line 1610 of file occlusion.c.
References OcclusionThread::begin, cent_tri_v3(), StrandSurface::co, co, StrandSurface::face, OcclusionThread::faceao, OcclusionThread::faceenv, OcclusionThread::faceindirect, interp_v3_v3v3(), OcclusionThread::mesh, negate_v3(), normal_quad_v3(), normal_tri_v3(), NULL, Render::occlusiontree, OcclusionThread::re, sample_occ_tree(), OcclusionThread::thread, and VECCOPY.
Referenced by make_occ_tree().
| static OcclusionCacheSample* find_occ_sample | ( | OcclusionCache * | cache, |
| int | x, | ||
| int | y | ||
| ) | [static] |
Definition at line 1455 of file occlusion.c.
References OcclusionCache::h, NULL, OcclusionCache::sample, OcclusionCache::step, OcclusionCache::w, OcclusionCache::x, and OcclusionCache::y.
Referenced by sample_occ_cache().
| void free_occ | ( | Render * | re | ) |
Definition at line 1746 of file occlusion.c.
References NULL, occ_free_tree(), and Render::occlusiontree.
Referenced by RE_Database_Free().
| void free_occ_samples | ( | Render * | re, |
| RenderPart * | pa | ||
| ) |
Definition at line 1895 of file occlusion.c.
References OcclusionTree::cache, OcclusionCache::h, MEM_freeN(), Render::occlusiontree, OcclusionCache::sample, OcclusionCache::step, RenderPart::thread, and OcclusionCache::w.
Referenced by shadeDA_tile(), and zbufshade_tile().
| void make_occ_tree | ( | Render * | re | ) |
Definition at line 1645 of file occlusion.c.
References StrandSurface::ao, World::ao_approx_passes, World::ao_indirect_bounces, OcclusionThread::begin, BLENDER_MAX_THREADS, BLI_end_threads(), BLI_init_threads(), BLI_insert_thread(), StrandSurface::co, OcclusionTree::doindirect, OcclusionThread::end, StrandSurface::env, exec_strandsurface_sample(), StrandSurface::face, OcclusionThread::faceao, OcclusionThread::faceenv, OcclusionThread::faceindirect, ListBase::first, Render::i, StrandSurface::indirect, RenderStats::infostr, MEM_callocN(), MEM_freeN(), OcclusionThread::mesh, World::mode, mul_v3_fl(), StrandSurface::next, occ_compute_bounces(), occ_compute_passes(), occ_tree_build(), Render::occlusiontree, Render::r, OcclusionThread::re, Render::sdh, Render::stats_draw, Render::strandsurface, OcclusionThread::thread, threads, RenderData::threads, StrandSurface::totface, StrandSurface::totvert, VECADD, VECCOPY, WO_INDIRECT_LIGHT, and Render::wrld.
Referenced by RE_Database_Baking(), and RE_Database_FromScene().
| static void normalizef | ( | float * | n | ) | [static] |
Definition at line 1117 of file occlusion.c.
References simple_enum_gen::d, F, INPR, and sqrtf.
Referenced by occ_quad_form_factor().
| static void occ_build_8_split | ( | OcclusionTree * | tree, |
| int | begin, | ||
| int | end, | ||
| int * | offset, | ||
| int * | count | ||
| ) | [static] |
Definition at line 484 of file occlusion.c.
References occ_build_split().
Referenced by occ_build_recursive().
| static void occ_build_dco | ( | OcclusionTree * | tree, |
| OccNode * | node, | ||
| const float | co[3], | ||
| float * | dco | ||
| ) | [static] |
Definition at line 431 of file occlusion.c.
References OccNode::child, OccNode::childflag, OccNode::co, simple_enum_gen::d, OccNode::face, OcclusionTree::face, INPR, OccNode::node, NULL, occ_face(), TOTCHILD, VECCOPY, and VECSUB.
Referenced by occ_build_recursive().
| static void occ_build_recursive | ( | OcclusionTree * | tree, |
| OccNode * | node, | ||
| int | begin, | ||
| int | end, | ||
| int | depth | ||
| ) | [static] |
Definition at line 528 of file occlusion.c.
References OccNode::area, OcclusionTree::arena, OcclusionBuildThread::begin, BLENDER_MAX_THREADS, BLI_end_threads(), BLI_init_threads(), BLI_insert_thread(), BLI_lock_thread(), BLI_memarena_alloc(), BLI_unlock_thread(), OccNode::child, OccNode::childflag, OccNode::co, OccNode::dco, OcclusionBuildThread::depth, OcclusionTree::dothreadedbuild, OcclusionBuildThread::end, exec_occ_build(), OccNode::face, OcclusionTree::face, LOCK_CUSTOM1, OcclusionTree::maxdepth, mul_v3_fl(), OccNode::node, OcclusionBuildThread::node, NULL, occ_build_8_split(), occ_build_dco(), occ_node_from_face(), OccNode::occlusion, OccNode::sh, sh_add(), threads, OcclusionTree::totbuildthread, TOTCHILD, OcclusionBuildThread::tree, and VECADDFAC.
Referenced by exec_occ_build(), and occ_tree_build().
| static void occ_build_sh_normalize | ( | OccNode * | node | ) | [static] |
Definition at line 621 of file occlusion.c.
References OccNode::area, OccNode::child, OccNode::childflag, OccNode::node, OccNode::sh, sh_mul(), and TOTCHILD.
Referenced by occ_tree_build().
| static void occ_build_shade | ( | Render * | re, |
| OcclusionTree * | tree | ||
| ) | [static] |
Definition at line 212 of file occlusion.c.
References ShadeInput::combinedflag, OcclusionTree::face, OccFace::facenr, ShadeInput::lay, Render::lay, OccFace::obi, Render::objectinstance, ObjectInstanceRen::obr, occ_shade(), ShadeInput::passflag, OcclusionTree::rad, RE_findOrAddVlak(), SCE_PASS_DIFFUSE, SCE_PASS_RGBA, SCE_PASS_SPEC, ShadeSample::shi, ShadeSample::tot, and OcclusionTree::totface.
Referenced by occ_tree_build().
| static void occ_build_split | ( | OcclusionTree * | tree, |
| int | begin, | ||
| int | end, | ||
| int * | split | ||
| ) | [static] |
Definition at line 456 of file occlusion.c.
References OcclusionTree::co, OcclusionTree::face, max, min, occ_find_bbox_axis(), and SWAP.
Referenced by occ_build_8_split().
| static void occ_compute_bounces | ( | Render * | re, |
| OcclusionTree * | tree, | ||
| int | totbounce | ||
| ) | [static] |
Definition at line 1320 of file occlusion.c.
References add_v3_v3(), co, OcclusionTree::face, i, madd_v3_v3fl(), MAX2, MEM_callocN(), MEM_dupallocN(), MEM_freeN(), NULL, occ_face(), occ_lookup(), occ_sum_occlusion(), OcclusionTree::rad, OcclusionTree::root, sum(), Render::tbh, Render::test_break, and OcclusionTree::totface.
Referenced by make_occ_tree().
| static void occ_compute_passes | ( | Render * | re, |
| OcclusionTree * | tree, | ||
| int | totpass | ||
| ) | [static] |
Definition at line 1361 of file occlusion.c.
References co, OcclusionTree::face, i, MEM_callocN(), MEM_freeN(), negate_v3(), NULL, occ_face(), occ_lookup(), occ_sum_occlusion(), OcclusionTree::occlusion, OcclusionTree::root, Render::tbh, Render::test_break, OcclusionTree::totface, and VECADDFAC.
Referenced by make_occ_tree().
| static void occ_face | ( | const OccFace * | face, |
| float | co[3], | ||
| float | normal[3], | ||
| float * | area | ||
| ) | [static] |
Definition at line 314 of file occlusion.c.
References area_quad_v3(), area_tri_v3(), cent_tri_v3(), VertRen::co, OccFace::facenr, ObjectInstanceRen::flag, interp_v3_v3v3(), ObjectInstanceRen::mat, mul_m3_v3(), mul_m4_v3(), VlakRen::n, ObjectInstanceRen::nmat, OccFace::obi, Render::objectinstance, ObjectInstanceRen::obr, R_TRANSFORMED, RE_findOrAddVlak(), VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, and VECCOPY.
Referenced by occ_build_dco(), occ_compute_bounces(), occ_compute_passes(), occ_lookup(), occ_node_from_face(), occ_sum_occlusion(), and occ_tree_build().
| static int occ_find_bbox_axis | ( | OcclusionTree * | tree, |
| int | begin, | ||
| int | end, | ||
| float * | min, | ||
| float * | max | ||
| ) | [static] |
Definition at line 400 of file occlusion.c.
References OcclusionTree::co, DO_MINMAX, and INIT_MINMAX.
Referenced by occ_build_split().
| static float occ_form_factor | ( | OccFace * | face, |
| float * | p, | ||
| float * | n | ||
| ) | [static] |
Definition at line 1168 of file occlusion.c.
References VertRen::co, OccFace::facenr, ObjectInstanceRen::flag, ObjectInstanceRen::mat, mul_m4_v3(), OccFace::obi, Render::objectinstance, ObjectInstanceRen::obr, occ_quad_form_factor(), occ_visible_quad(), R_TRANSFORMED, RE_findOrAddVlak(), VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, and VECCOPY.
Referenced by occ_lookup().
| static void occ_free_tree | ( | OcclusionTree * | tree | ) | [static] |
Definition at line 730 of file occlusion.c.
References OcclusionTree::arena, BLENDER_MAX_THREADS, BLI_memarena_free(), OcclusionTree::cache, OcclusionTree::face, MEM_freeN(), OcclusionTree::occlusion, OcclusionTree::rad, and OcclusionTree::stack.
Referenced by free_occ().
| static void occ_lookup | ( | OcclusionTree * | tree, |
| int | thread, | ||
| OccFace * | exclude, | ||
| float * | pp, | ||
| float * | pn, | ||
| float * | occ, | ||
| float | rad[3], | ||
| float | bentn[3] | ||
| ) | [static] |
Definition at line 1202 of file occlusion.c.
References OccNode::area, OccNode::child, OccNode::childflag, OccNode::co, co, copy_v3_v3(), OccNode::dco, OcclusionTree::distfac, error(), OcclusionTree::error, OccNode::face, OcclusionTree::face, OccFace::facenr, INPR, madd_v3_v3fl(), MAX2, OccNode::node, normalize_v3(), NULL, OccFace::obi, occ_face(), occ_form_factor(), occ_solid_angle(), OccNode::occlusion, OcclusionTree::occlusion, OccNode::rad, OcclusionTree::rad, OcclusionTree::root, sqrtf, stack, OcclusionTree::stack, TOTCHILD, VECADDFAC, VECCOPY, VECSUB, and zero_v3().
Referenced by occ_compute_bounces(), occ_compute_passes(), and sample_occ_tree().
Definition at line 422 of file occlusion.c.
References OccNode::area, OccNode::co, OccNode::dco, occ_face(), OccNode::sh, and sh_from_disc().
Referenced by occ_build_recursive().
| static float occ_quad_form_factor | ( | float * | p, |
| float * | n, | ||
| float * | q0, | ||
| float * | q1, | ||
| float * | q2, | ||
| float * | q3 | ||
| ) | [static] |
Definition at line 1132 of file occlusion.c.
References cross_v3_v3v3(), INPR, M_PI, MAX2, normalizef(), saacosf(), and VECSUB.
Referenced by occ_form_factor().
| static void occ_shade | ( | ShadeSample * | ssamp, |
| ObjectInstanceRen * | obi, | ||
| VlakRen * | vlr, | ||
| float * | rad | ||
| ) | [static] |
Definition at line 145 of file occlusion.c.
References ShadeInput::co, VertRen::co, ShadeResult::combined, ShadeInput::flippednor, Material::har, ShadeInput::har, madd_v3_v3fl(), ShadeInput::mat, negate_v3(), ShadeInput::nmapnorm, normalize_v3(), ObjectRen::ob, OB_NEG_SCALE, ShadeInput::obr, Material::r, ShadeInput::r, ShadeInput::samplenr, shade_input_flip_normals(), shade_input_set_normals(), shade_input_set_shade_texco(), shade_input_set_triangle_i(), shade_material_loop(), ShadeSample::shi, ShadeSample::shr, Object::transflag, ShadeInput::u, ShadeInput::v, VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, VECCOPY, ShadeInput::view, ShadeInput::vn, ShadeInput::vno, ShadeInput::xs, and ShadeInput::ys.
Referenced by occ_build_shade().
| static float occ_solid_angle | ( | OccNode * | node, |
| float * | v, | ||
| float | d2, | ||
| float | invd2, | ||
| float * | receivenormal | ||
| ) | [static] |
Definition at line 749 of file occlusion.c.
References OccNode::area, CLAMP(), INPR, INVPI, OccNode::sh, and sh_eval().
Referenced by occ_lookup().
| static void occ_sum_occlusion | ( | OcclusionTree * | tree, |
| OccNode * | node | ||
| ) | [static] |
Definition at line 363 of file occlusion.c.
References OccNode::area, OccNode::child, OccNode::childflag, copy_v3_v3(), OcclusionTree::doindirect, OccNode::face, OcclusionTree::face, madd_v3_v3fl(), mul_v3_fl(), OccNode::node, occ_face(), OccNode::occlusion, OcclusionTree::occlusion, OccNode::rad, OcclusionTree::rad, TOTCHILD, and zero_v3().
Referenced by occ_compute_bounces(), occ_compute_passes(), and occ_tree_build().
| static OcclusionTree* occ_tree_build | ( | Render * | re | ) | [static] |
Definition at line 637 of file occlusion.c.
References World::ao_approx_error, World::ao_indirect_bounces, World::ao_indirect_energy, World::aodistfac, World::aomode, OcclusionTree::arena, BLENDER_MAX_THREADS, BLI_memarena_alloc(), BLI_memarena_new(), BLI_memarena_use_calloc(), OcclusionTree::cache, OcclusionTree::co, OcclusionTree::distfac, OcclusionTree::doindirect, OcclusionTree::dothreadedbuild, OcclusionTree::error, OcclusionTree::face, OccFace::facenr, ListBase::first, get_render_aosss_error(), Render::instancetable, MA_APPROX_OCCLUSION, MA_TYPE_SURFACE, VlakRen::mat, Material::material_type, OcclusionTree::maxdepth, MEM_callocN(), MEM_freeN(), ObjectInstanceRen::next, NULL, OccFace::obi, ObjectInstanceRen::obr, occ_build_recursive(), occ_build_sh_normalize(), occ_build_shade(), occ_face(), occ_sum_occlusion(), OcclusionTree::occlusion, Render::r, OcclusionTree::rad, OcclusionTree::root, Material::shade_flag, OcclusionTree::stack, RenderData::threads, OcclusionTree::totbuildthread, TOTCHILD, OcclusionTree::totface, ObjectRen::totvlak, VlakTableNode::vlak, ObjectRen::vlaknodes, WO_AOCACHE, WO_AODIST, and Render::wrld.
Referenced by make_occ_tree().
| static int occ_visible_quad | ( | float * | p, |
| float * | n, | ||
| float * | v0, | ||
| float * | v1, | ||
| float * | v2, | ||
| float * | q0, | ||
| float * | q1, | ||
| float * | q2, | ||
| float * | q3 | ||
| ) | [static] |
Definition at line 773 of file occlusion.c.
References KDL::epsilon, fabsf, INPR, VecAddDir(), and VECCOPY.
Referenced by occ_form_factor().
| void sample_occ | ( | Render * | re, |
| ShadeInput * | shi | ||
| ) |
Definition at line 1754 of file occlusion.c.
References OcclusionCacheSample::ao, ShadeInput::ao, OcclusionTree::cache, OcclusionCacheSample::co, ShadeInput::co, ShadeInput::depth, OcclusionCacheSample::dist2, ShadeInput::dxco, ShadeInput::dyco, OcclusionCacheSample::env, ShadeInput::env, OccFace::facenr, OcclusionCacheSample::filled, VlakRen::index, OcclusionCacheSample::indirect, ShadeInput::indirect, INPR, OcclusionCacheSample::intensity, MA_ONLYSHADOW, ShadeInput::mat, MAX2, MAX3(), Material::mode, OcclusionCacheSample::n, OccFace::obi, ShadeInput::obi, Render::objectinstance, Render::occlusiontree, OcclusionCache::sample, sample_occ_cache(), sample_occ_surface(), sample_occ_tree(), OcclusionCache::step, ShadeInput::strand, ShadeInput::thread, VECCOPY, ShadeInput::vlr, ShadeInput::vno, OcclusionCache::w, OcclusionCache::x, ShadeInput::xs, OcclusionCache::y, and ShadeInput::ys.
Referenced by ambient_occlusion().
| static int sample_occ_cache | ( | OcclusionTree * | tree, |
| float * | co, | ||
| float * | n, | ||
| int | x, | ||
| int | y, | ||
| int | thread, | ||
| float * | ao, | ||
| float * | env, | ||
| float * | indirect | ||
| ) | [static] |
Definition at line 1471 of file occlusion.c.
References OcclusionCacheSample::ao, OcclusionTree::cache, OcclusionCacheSample::co, simple_enum_gen::d, OcclusionCacheSample::env, OcclusionCacheSample::filled, find_occ_sample(), i, OcclusionCacheSample::indirect, INPR, madd_v3_v3fl(), MAX4, MIN4, mul_v3_fl(), OcclusionCacheSample::n, pow(), OcclusionCache::sample, OcclusionCache::step, VECCOPY, VECSUB, simple_enum_gen::w, OcclusionCache::w, OcclusionCacheSample::x, OcclusionCache::x, OcclusionCacheSample::y, OcclusionCache::y, and zero_v3().
Referenced by sample_occ().
| static void sample_occ_surface | ( | ShadeInput * | shi | ) | [static] |
Definition at line 1563 of file occlusion.c.
References ShadeInput::ao, StrandSurface::ao, StrandRen::buffer, StrandVert::co, StrandSurface::co, ShadeInput::env, StrandSurface::env, StrandSurface::face, ShadeInput::indirect, StrandSurface::indirect, interp_weights_face_v3(), madd_v3_v3fl(), NULL, ShadeInput::obr, RE_strandren_get_face(), ShadeInput::strand, StrandBuffer::surface, StrandRen::vert, simple_enum_gen::w, and zero_v3().
Referenced by sample_occ().
| static void sample_occ_tree | ( | Render * | re, |
| OcclusionTree * | tree, | ||
| OccFace * | exclude, | ||
| float * | co, | ||
| float * | n, | ||
| int | thread, | ||
| int | onlyshadow, | ||
| float * | ao, | ||
| float * | env, | ||
| float * | indirect | ||
| ) | [static] |
Definition at line 1394 of file occlusion.c.
References World::ao_approx_correction, World::aocolor, CLAMP(), copy_v3_v3(), OcclusionTree::doindirect, ELEM, KDL::exp(), Render::grvec, World::horb, World::horg, World::horr, mul_v3_fl(), negate_v3_v3(), NULL, occ_lookup(), shadeSkyView(), WO_AOPLAIN, WO_AOSKYCOL, WO_AOSKYTEX, Render::wrld, World::zenb, World::zeng, World::zenr, and zero_v3().
Referenced by cache_occ_samples(), exec_strandsurface_sample(), and sample_occ().
| static void sh_add | ( | float * | shresult, |
| float * | sh1, | ||
| float * | sh2 | ||
| ) | [static] |
| static void sh_copy | ( | float * | shresult, |
| float * | sh | ||
| ) | [static] |
Definition at line 243 of file occlusion.c.
Referenced by sh_from_disc().
| static float sh_eval | ( | float * | sh, |
| float * | v | ||
| ) | [static] |
| static void sh_from_disc | ( | float * | n, |
| float | area, | ||
| float * | shresult | ||
| ) | [static] |
Definition at line 264 of file occlusion.c.
References sh_copy(), and sh_mul().
Referenced by occ_node_from_face().
| static void sh_mul | ( | float * | sh, |
| float | f | ||
| ) | [static] |
Definition at line 248 of file occlusion.c.
References i.
Referenced by occ_build_sh_normalize(), and sh_from_disc().
| static void VecAddDir | ( | float * | result, |
| float * | v1, | ||
| float * | v2, | ||
| float | fac | ||
| ) | [static] |
Definition at line 766 of file occlusion.c.
Referenced by occ_visible_quad().
Definition at line 127 of file pipeline.c.