Blender V2.61 - r43446
|
Go to the source code of this file.
Typedefs | |
typedef struct ScatterSettings | ScatterSettings |
typedef struct ScatterTree | ScatterTree |
Functions | |
ScatterSettings * | scatter_settings_new (float refl, float radius, float ior, float reflfac, float frontweight, float backweight) |
void | scatter_settings_free (ScatterSettings *ss) |
ScatterTree * | scatter_tree_new (ScatterSettings *ss[3], float scale, float error, float(*co)[3], float(*color)[3], float *area, int totpoint) |
void | scatter_tree_build (ScatterTree *tree) |
void | scatter_tree_sample (ScatterTree *tree, float *co, float *color) |
void | scatter_tree_free (ScatterTree *tree) |
void | make_sss_tree (struct Render *re) |
void | sss_add_points (Render *re, float(*co)[3], float(*color)[3], float *area, int totpoint) |
void | free_sss (struct Render *re) |
int | sample_sss (struct Render *re, struct Material *mat, float *co, float *col) |
int | sss_pass_done (struct Render *re, struct Material *mat) |
Definition in file sss.h.
typedef struct ScatterSettings ScatterSettings |
typedef struct ScatterTree ScatterTree |
void free_sss | ( | struct Render * | re | ) |
Definition at line 1016 of file sss.c.
References BLI_ghash_free(), BLI_ghashIterator_free(), BLI_ghashIterator_getValue(), BLI_ghashIterator_isDone(), BLI_ghashIterator_new(), BLI_ghashIterator_step(), NULL, sss_free_tree(), and Render::sss_hash.
Referenced by RE_Database_Free().
void make_sss_tree | ( | struct Render * | re | ) |
Definition at line 993 of file sss.c.
References BLI_ghash_new(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), ListBase::first, Material::flag, G, Render::i, Material::id, RenderStats::infostr, MA_DIFF_SSS, MA_IS_USED, Render::main, Main::mat, ID::next, Render::sdh, sss_create_tree_mat(), Material::sss_flag, Render::sss_hash, Render::stats_draw, and ID::us.
Referenced by RE_Database_FromScene().
Definition at line 1032 of file sss.c.
References BLI_ghash_lookup(), scatter_tree_sample(), Render::sss_hash, and SSSData::tree.
Referenced by shade_lamp_loop().
void scatter_settings_free | ( | ScatterSettings * | ss | ) |
Definition at line 338 of file sss.c.
References MEM_freeN(), ScatterSettings::tableRd, and ScatterSettings::tableRd2.
Referenced by sss_free_tree().
ScatterSettings* scatter_settings_new | ( | float | refl, |
float | radius, | ||
float | ior, | ||
float | reflfac, | ||
float | frontweight, | ||
float | backweight | ||
) |
Definition at line 301 of file sss.c.
References ScatterSettings::A, ScatterSettings::alpha_, ScatterSettings::backweight, build_Rd_table(), ScatterSettings::color, compute_reduced_albedo(), ScatterSettings::D, ScatterSettings::eta, ScatterSettings::Fdr, ScatterSettings::frontweight, ScatterSettings::invsigma_t_, ScatterSettings::ld, MEM_callocN(), MIN2, ScatterSettings::ro, ScatterSettings::sigma, ScatterSettings::sigma_a, ScatterSettings::sigma_s_, ScatterSettings::sigma_t_, sqrtf, ScatterSettings::zr, and ScatterSettings::zv.
Referenced by sss_create_tree_mat().
void scatter_tree_build | ( | ScatterTree * | tree | ) |
Definition at line 778 of file sss.c.
References ScatterTree::arena, BLI_memarena_alloc(), BLI_memarena_new(), BLI_memarena_use_calloc(), create_octree_node(), ScatterTree::max, MEM_callocN(), MEM_freeN(), ScatterTree::min, NULL, ScatterTree::points, ScatterNode::points, ScatterTree::refpoints, ScatterTree::root, size(), sum_radiance(), ScatterTree::tmppoints, ScatterNode::totpoint, and ScatterTree::totpoint.
Referenced by sss_create_tree_mat().
void scatter_tree_free | ( | ScatterTree * | tree | ) |
Definition at line 827 of file sss.c.
References ScatterTree::arena, BLI_memarena_free(), MEM_freeN(), ScatterTree::points, and ScatterTree::refpoints.
Referenced by sss_free_tree().
ScatterTree* scatter_tree_new | ( | ScatterSettings * | ss[3], |
float | scale, | ||
float | error, | ||
float(*) | co[3], | ||
float(*) | color[3], | ||
float * | area, | ||
int | totpoint | ||
) |
Definition at line 737 of file sss.c.
References ScatterPoint::area, ScatterPoint::back, co, MakeCursor::color, copy_v3_v3(), DO_MINMAX, ScatterTree::error, error(), fabsf, i, INIT_MINMAX, ScatterTree::max, MEM_callocN(), ScatterTree::min, mul_v3_fl(), ScatterTree::points, ScatterTree::refpoints, ScatterTree::scale, ScatterTree::ss, and ScatterTree::totpoint.
Referenced by sss_create_tree_mat().
void scatter_tree_sample | ( | ScatterTree * | tree, |
float * | co, | ||
float * | color | ||
) |
Definition at line 817 of file sss.c.
References compute_radiance(), copy_v3_v3(), mul_v3_fl(), and ScatterTree::scale.
Referenced by sample_sss().
void sss_add_points | ( | Render * | re, |
float(*) | co[3], | ||
float(*) | color[3], | ||
float * | area, | ||
int | totpoint | ||
) |
Definition at line 964 of file sss.c.
References SSSPoints::area, BLI_addtail(), BLI_lock_thread(), BLI_unlock_thread(), SSSPoints::co, co, SSSPoints::color, MakeCursor::color, LOCK_CUSTOM1, MEM_callocN(), p, Render::sss_points, and SSSPoints::totpoint.
Referenced by zbufshade_sss_tile().
Definition at line 1051 of file sss.c.
References BLI_ghash_lookup(), Render::flag, RenderData::mode, Render::r, R_BAKING, R_SSS, and Render::sss_hash.
Referenced by shade_lamp_loop().