Blender V2.61 - r43446
|
#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, const float v[3], float d2, float invd2, const float receivenormal[3]) |
static void | VecAddDir (float result[3], const float v1[3], const float v2[3], const float fac) |
static int | occ_visible_quad (float *p, const float n[3], const float v0[3], const float *v1, const float *v2, float q0[3], float q1[3], float q2[3], float q3[3]) |
static void | normalizef (float *n) |
static float | occ_quad_form_factor (const float p[3], const float n[3], const float q0[3], const float q1[3], const float q2[3], const float q3[3]) |
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 69 of file occlusion.c.
Referenced by cache_occ_samples().
#define INVALID_INDEX ((int)(~0)) |
Definition at line 66 of file occlusion.c.
#define INVPI 0.31830988618379069f |
Definition at line 67 of file occlusion.c.
Referenced by occ_solid_angle().
#define TOTCHILD 8 |
Definition at line 68 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 1808 of file occlusion.c.
References OcclusionCacheSample::ao, ShadeInput::ao, OcclusionTree::cache, CACHE_STEP, OcclusionCacheSample::co, ShadeInput::co, copy_v3_v3(), RenderPart::disprect, OcclusionCacheSample::dist2, dot_v3v3(), ShadeInput::dxco, ShadeInput::dyco, OcclusionCacheSample::env, ShadeInput::env, OccFace::facenr, PixStr::facenr, OcclusionCacheSample::filled, OcclusionCache::h, VlakRen::index, OcclusionCacheSample::indirect, ShadeInput::indirect, OcclusionCacheSample::intensity, MA_ONLYSHADOW, PixStr::mask, ShadeInput::mat, MAX2, MAX3(), MEM_callocN(), Material::mode, OcclusionCacheSample::n, PixStr::next, NULL, ShadeInput::obi, OccFace::obi, PixStr::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, step(), Render::tbh, Render::test_break, ShadeInput::thread, RenderPart::thread, 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 518 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 1609 of file occlusion.c.
References OcclusionThread::begin, cent_tri_v3(), StrandSurface::co, co, copy_v3_v3(), StrandSurface::face, OcclusionThread::faceao, OcclusionThread::faceenv, OcclusionThread::faceindirect, OcclusionThread::mesh, mid_v3_v3v3(), negate_v3(), normal_quad_v3(), normal_tri_v3(), NULL, Render::occlusiontree, OcclusionThread::re, sample_occ_tree(), and OcclusionThread::thread.
Referenced by make_occ_tree().
static OcclusionCacheSample* find_occ_sample | ( | OcclusionCache * | cache, |
int | x, | ||
int | y | ||
) | [static] |
Definition at line 1454 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 1745 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 1894 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 1644 of file occlusion.c.
References add_v3_v3(), 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, copy_v3_v3(), 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, RenderData::threads, threads, StrandSurface::totface, StrandSurface::totvert, WO_INDIRECT_LIGHT, and Render::wrld.
Referenced by RE_Database_Baking(), and RE_Database_FromScene().
static void normalizef | ( | float * | n | ) | [static] |
Definition at line 1116 of file occlusion.c.
References simple_enum_gen::d, dot_v3v3(), credits_svn_gen::e, F, 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 483 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 430 of file occlusion.c.
References OccNode::child, OccNode::childflag, OccNode::co, copy_v3_v3(), simple_enum_gen::d, dot_v3v3(), OccNode::face, OcclusionTree::face, OccNode::node, NULL, occ_face(), sub_v3_v3v3(), and TOTCHILD.
Referenced by occ_build_recursive().
static void occ_build_recursive | ( | OcclusionTree * | tree, |
OccNode * | node, | ||
int | begin, | ||
int | end, | ||
int | depth | ||
) | [static] |
Definition at line 527 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, madd_v3_v3fl(), 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, and OcclusionBuildThread::tree.
Referenced by exec_occ_build(), and occ_tree_build().
static void occ_build_sh_normalize | ( | OccNode * | node | ) | [static] |
Definition at line 620 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 211 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 455 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 1319 of file occlusion.c.
References add_v3_v3(), co, credits_svn_gen::e, 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 1360 of file occlusion.c.
References co, credits_svn_gen::e, OcclusionTree::face, i, madd_v3_v3fl(), MEM_callocN(), MEM_freeN(), negate_v3(), NULL, occ_face(), occ_lookup(), occ_sum_occlusion(), OcclusionTree::occlusion, OcclusionTree::root, Render::tbh, Render::test_break, and OcclusionTree::totface.
Referenced by make_occ_tree().
static void occ_face | ( | const OccFace * | face, |
float | co[3], | ||
float | normal[3], | ||
float * | area | ||
) | [static] |
Definition at line 313 of file occlusion.c.
References area_quad_v3(), area_tri_v3(), cent_tri_v3(), VertRen::co, copy_v3_v3(), OccFace::facenr, ObjectInstanceRen::flag, ObjectInstanceRen::mat, mid_v3_v3v3(), 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, and VlakRen::v4.
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 399 of file occlusion.c.
References OcclusionTree::co, DO_MINMAX, INIT_MINMAX, and len().
Referenced by occ_build_split().
static float occ_form_factor | ( | OccFace * | face, |
float * | p, | ||
float * | n | ||
) | [static] |
Definition at line 1167 of file occlusion.c.
References VertRen::co, copy_v3_v3(), 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, and VlakRen::v4.
Referenced by occ_lookup().
static void occ_free_tree | ( | OcclusionTree * | tree | ) | [static] |
Definition at line 729 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 1201 of file occlusion.c.
References OccNode::area, OccNode::child, OccNode::childflag, OccNode::co, co, copy_v3_v3(), OccNode::dco, OcclusionTree::distfac, dot_v3v3(), credits_svn_gen::e, OcclusionTree::error, error(), OcclusionTree::face, OccNode::face, OccFace::facenr, madd_v3_v3fl(), MAX2, OccNode::node, normalize_v3(), NULL, OccFace::obi, occ_face(), occ_form_factor(), occ_solid_angle(), OcclusionTree::occlusion, OccNode::occlusion, OcclusionTree::rad, OccNode::rad, OcclusionTree::root, sqrtf, OcclusionTree::stack, stack, sub_v3_v3v3(), TOTCHILD, and zero_v3().
Referenced by occ_compute_bounces(), occ_compute_passes(), and sample_occ_tree().
Definition at line 421 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 | ( | const float | p[3], |
const float | n[3], | ||
const float | q0[3], | ||
const float | q1[3], | ||
const float | q2[3], | ||
const float | q3[3] | ||
) | [static] |
Definition at line 1131 of file occlusion.c.
References cross_v3_v3v3(), dot_v3v3(), M_PI, MAX2, normalizef(), saacosf(), and sub_v3_v3v3().
Referenced by occ_form_factor().
static void occ_shade | ( | ShadeSample * | ssamp, |
ObjectInstanceRen * | obi, | ||
VlakRen * | vlr, | ||
float * | rad | ||
) | [static] |
Definition at line 144 of file occlusion.c.
References VertRen::co, ShadeInput::co, ShadeResult::combined, copy_v3_v3(), ShadeInput::flippednor, Material::har, ShadeInput::har, madd_v3_v3fl(), ShadeInput::mat, negate_v3(), ShadeInput::nmapnorm, normalize_v3(), ObjectRen::ob, OB_NEG_SCALE, ShadeInput::obr, ShadeInput::r, Material::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, ShadeInput::view, ShadeInput::vn, ShadeInput::vno, ShadeInput::xs, and ShadeInput::ys.
Referenced by occ_build_shade().
static float occ_solid_angle | ( | OccNode * | node, |
const float | v[3], | ||
float | d2, | ||
float | invd2, | ||
const float | receivenormal[3] | ||
) | [static] |
Definition at line 748 of file occlusion.c.
References OccNode::area, CLAMP(), dot_v3v3(), INVPI, OccNode::sh, and sh_eval().
Referenced by occ_lookup().
static void occ_sum_occlusion | ( | OcclusionTree * | tree, |
OccNode * | node | ||
) | [static] |
Definition at line 362 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, OcclusionTree::rad, OccNode::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 636 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, |
const float | n[3], | ||
const float | v0[3], | ||
const float * | v1, | ||
const float * | v2, | ||
float | q0[3], | ||
float | q1[3], | ||
float | q2[3], | ||
float | q3[3] | ||
) | [static] |
Definition at line 772 of file occlusion.c.
References copy_v3_v3(), dot_v3v3(), credits_svn_gen::e, KDL::epsilon, fabsf, and VecAddDir().
Referenced by occ_form_factor().
void sample_occ | ( | Render * | re, |
ShadeInput * | shi | ||
) |
Definition at line 1753 of file occlusion.c.
References OcclusionCacheSample::ao, ShadeInput::ao, OcclusionTree::cache, OcclusionCacheSample::co, ShadeInput::co, copy_v3_v3(), ShadeInput::depth, OcclusionCacheSample::dist2, dot_v3v3(), ShadeInput::dxco, ShadeInput::dyco, OcclusionCacheSample::env, ShadeInput::env, OccFace::facenr, OcclusionCacheSample::filled, VlakRen::index, OcclusionCacheSample::indirect, ShadeInput::indirect, OcclusionCacheSample::intensity, MA_ONLYSHADOW, ShadeInput::mat, MAX2, MAX3(), Material::mode, OcclusionCacheSample::n, ShadeInput::obi, OccFace::obi, Render::objectinstance, Render::occlusiontree, OcclusionCache::sample, sample_occ_cache(), sample_occ_surface(), sample_occ_tree(), OcclusionCache::step, ShadeInput::strand, ShadeInput::thread, 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 1470 of file occlusion.c.
References OcclusionCacheSample::ao, OcclusionTree::cache, OcclusionCacheSample::co, copy_v3_v3(), simple_enum_gen::d, dot_v3v3(), OcclusionCacheSample::env, OcclusionCacheSample::filled, find_occ_sample(), i, OcclusionCacheSample::indirect, madd_v3_v3fl(), MAX4, MIN4, mul_v3_fl(), OcclusionCacheSample::n, pow(), OcclusionCache::sample, OcclusionCache::step, sub_v3_v3v3(), simple_enum_gen::w, OcclusionCache::w, OcclusionCache::x, OcclusionCacheSample::x, OcclusionCache::y, OcclusionCacheSample::y, and zero_v3().
Referenced by sample_occ().
static void sample_occ_surface | ( | ShadeInput * | shi | ) | [static] |
Definition at line 1562 of file occlusion.c.
References ShadeInput::ao, StrandSurface::ao, StrandRen::buffer, StrandVert::co, StrandSurface::co, StrandSurface::env, ShadeInput::env, StrandSurface::face, StrandSurface::indirect, ShadeInput::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 1393 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 242 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 263 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 247 of file occlusion.c.
References i.
Referenced by occ_build_sh_normalize(), and sh_from_disc().
static void VecAddDir | ( | float | result[3], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | fac | ||
) | [static] |
Definition at line 765 of file occlusion.c.
Referenced by occ_visible_quad().
Definition at line 127 of file pipeline.c.