Blender V2.61 - r43446
|
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <assert.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_jitter.h"
#include "BLI_rand.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "DNA_image_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_group_types.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_texture.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "rayintersection.h"
#include "rayobject.h"
#include "renderpipeline.h"
#include "render_result.h"
#include "render_types.h"
#include "renderdatabase.h"
#include "occlusion.h"
#include "pixelblending.h"
#include "pixelshading.h"
#include "shadbuf.h"
#include "shading.h"
#include "sss.h"
#include "zbuf.h"
#include "PIL_time.h"
#include "rendercore.h"
Go to the source code of this file.
Classes | |
struct | ZbufSolidData |
struct | ZBufSSSHandle |
struct | BakeShade |
Typedefs | |
typedef struct ZbufSolidData | ZbufSolidData |
typedef struct ZBufSSSHandle | ZBufSSSHandle |
typedef struct BakeShade | BakeShade |
Functions | |
void | calc_view_vector (float *view, float x, float y) |
void | calc_renderco_ortho (float co[3], float x, float y, int z) |
void | calc_renderco_zbuf (float co[3], const float view[3], int z) |
int | count_mask (unsigned short mask) |
static int | calchalo_z (HaloRen *har, int zz) |
static void | halo_pixelstruct (HaloRen *har, RenderLayer **rlpp, int totsample, int od, float dist, float xn, float yn, PixStr *ps) |
static void | halo_tile (RenderPart *pa, RenderLayer *rl) |
static void | lamphalo_tile (RenderPart *pa, RenderLayer *rl) |
static void | add_filt_passes (RenderLayer *rl, int curmask, int rectx, int offset, ShadeInput *shi, ShadeResult *shr) |
static void | add_passes (RenderLayer *rl, int offset, ShadeInput *shi, ShadeResult *shr) |
int | get_sample_layers (RenderPart *pa, RenderLayer *rl, RenderLayer **rlpp) |
static void | sky_tile (RenderPart *pa, RenderLayer *rl) |
static void | atm_tile (RenderPart *pa, RenderLayer *rl) |
static void | shadeDA_tile (RenderPart *pa, RenderLayer *rl) |
static PixStrMain * | addpsmain (ListBase *lb) |
static void | freeps (ListBase *lb) |
static void | addps (ListBase *lb, intptr_t *rd, int obi, int facenr, int z, int maskz, unsigned short mask) |
static void | edge_enhance_add (RenderPart *pa, float *rectf, float *arect) |
static void | convert_to_key_alpha (RenderPart *pa, RenderLayer *rl) |
static void | edge_enhance_tile (RenderPart *pa, float *rectf, int *rectz) |
static void | reset_sky_speed (RenderPart *pa, RenderLayer *rl) |
static unsigned short * | make_solid_mask (RenderPart *pa) |
static void | addAlphaOverFloatMask (float *dest, float *source, unsigned short dmask, unsigned short smask) |
static void | make_pixelstructs (RenderPart *pa, ZSpan *zspan, int sample, void *data) |
void | zbufshadeDA_tile (RenderPart *pa) |
void | zbufshade_tile (RenderPart *pa) |
static void | addps_sss (void *cb_handle, int obi, int facenr, int x, int y, int z) |
static void | shade_sample_sss (ShadeSample *ssamp, Material *mat, ObjectInstanceRen *obi, VlakRen *vlr, int quad, float x, float y, float z, float *co, float *color, float *area) |
static void | zbufshade_sss_free (RenderPart *pa) |
void | zbufshade_sss_tile (RenderPart *pa) |
static void | renderhalo_post (RenderResult *rr, float *rectf, HaloRen *har) |
static void | renderflare (RenderResult *rr, float *rectf, HaloRen *har) |
void | add_halo_flare (Render *re) |
static void | bake_set_shade_input (ObjectInstanceRen *obi, VlakRen *vlr, ShadeInput *shi, int quad, int UNUSED(isect), int x, int y, float u, float v) |
static void | bake_shade (void *handle, Object *ob, ShadeInput *shi, int UNUSED(quad), int x, int y, float UNUSED(u), float UNUSED(v), float *tvn, float *ttang) |
static void | bake_displacement (void *handle, ShadeInput *UNUSED(shi), float dist, int x, int y) |
static int | bake_intersect_tree (RayObject *raytree, Isect *isect, float *start, float *dir, float sign, float *hitco, float *dist) |
static void | bake_set_vlr_dxyco (BakeShade *bs, float *uv1, float *uv2, float *uv3) |
static void | do_bake_shade (void *handle, int x, int y, float u, float v) |
static int | get_next_bake_face (BakeShade *bs) |
static void | shade_tface (BakeShade *bs) |
static void * | do_bake_thread (void *bs_v) |
void | RE_bake_ibuf_filter (ImBuf *ibuf, char *mask, const int filter) |
int | RE_bake_shade_all_selected (Render *re, int type, Object *actob, short *do_update, float *progress) |
struct Image * | RE_bake_shade_get_image (void) |
Variables | |
struct Render | R |
Definition in file rendercore.c.
typedef struct ZbufSolidData ZbufSolidData |
typedef struct ZBufSSSHandle ZBufSSSHandle |
static void add_filt_passes | ( | RenderLayer * | rl, |
int | curmask, | ||
int | rectx, | ||
int | offset, | ||
ShadeInput * | shi, | ||
ShadeResult * | shr | ||
) | [static] |
Definition at line 449 of file rendercore.c.
References ABS, ShadeInput::actuv, add_filt_fmask(), add_filt_fmask_pixsize(), ShadeResult::ao, ShadeResult::col, ShadeResult::combined, count_mask(), ShadeResult::diff, ShadeResult::emit, ShadeResult::env, ListBase::first, Material::index, Object::index, ShadeResult::indirect, ShadeInput::mat, ShadeResult::mist, RenderPass::next, ShadeResult::nor, NULL, ObjectRen::ob, ShadeInput::obr, RenderLayer::passes, RenderPass::passtype, R, ShadeResult::rayhits, RenderPass::rect, RenderLayer::rectf, ShadeResult::refl, ShadeResult::refr, SCE_PASS_AO, SCE_PASS_DIFFUSE, SCE_PASS_EMIT, SCE_PASS_ENVIRONMENT, SCE_PASS_INDEXMA, SCE_PASS_INDEXOB, SCE_PASS_INDIRECT, SCE_PASS_MIST, SCE_PASS_NORMAL, SCE_PASS_RAYHITS, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_RGBA, SCE_PASS_SHADOW, SCE_PASS_SPEC, SCE_PASS_UV, SCE_PASS_VECTOR, SCE_PASS_Z, ShadeResult::shad, ShadeResult::spec, ShadeInput::totuv, ShadeInputUV::uv, ShadeInput::uv, ShadeInput::vlr, ShadeResult::winspeed, and ShadeResult::z.
Referenced by shadeDA_tile().
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().
static void add_passes | ( | RenderLayer * | rl, |
int | offset, | ||
ShadeInput * | shi, | ||
ShadeResult * | shr | ||
) | [static] |
Definition at line 560 of file rendercore.c.
References ShadeInput::actuv, ShadeResult::ao, ShadeResult::col, ShadeResult::combined, copy_v4_v4(), ShadeResult::diff, ShadeResult::emit, ShadeResult::env, ListBase::first, Material::index, Object::index, ShadeResult::indirect, ShadeInput::mat, ShadeResult::mist, RenderPass::next, ShadeResult::nor, NULL, ObjectRen::ob, ShadeInput::obr, RenderLayer::passes, RenderPass::passtype, ShadeResult::rayhits, RenderPass::rect, RenderLayer::rectf, ShadeResult::refl, ShadeResult::refr, SCE_PASS_AO, SCE_PASS_DIFFUSE, SCE_PASS_EMIT, SCE_PASS_ENVIRONMENT, SCE_PASS_INDEXMA, SCE_PASS_INDEXOB, SCE_PASS_INDIRECT, SCE_PASS_MIST, SCE_PASS_NORMAL, SCE_PASS_RAYHITS, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_RGBA, SCE_PASS_SHADOW, SCE_PASS_SPEC, SCE_PASS_UV, SCE_PASS_VECTOR, SCE_PASS_Z, ShadeResult::shad, ShadeResult::spec, ShadeInput::totuv, ShadeInputUV::uv, ShadeInput::uv, ShadeInput::vlr, ShadeResult::winspeed, and ShadeResult::z.
Referenced by shadeDA_tile(), and zbufshade_tile().
static void addAlphaOverFloatMask | ( | float * | dest, |
float * | source, | ||
unsigned short | dmask, | ||
unsigned short | smask | ||
) | [static] |
Definition at line 1096 of file rendercore.c.
References add(), count_mask(), and mul().
Referenced by zbufshadeDA_tile().
static void addps | ( | ListBase * | lb, |
intptr_t * | rd, | ||
int | obi, | ||
int | facenr, | ||
int | z, | ||
int | maskz, | ||
unsigned short | mask | ||
) | [static] |
Definition at line 914 of file rendercore.c.
References addpsmain(), PixStrMain::counter, PixStr::facenr, ListBase::last, PixStr::mask, PixStr::maskz, PixStr::next, NULL, PixStr::obi, PixStrMain::ps, PixStr::shadfac, and PixStr::z.
Referenced by addps_sss(), make_pixelstructs(), and Select().
static void addps_sss | ( | void * | cb_handle, |
int | obi, | ||
int | facenr, | ||
int | x, | ||
int | y, | ||
int | z | ||
) | [static] |
Definition at line 1466 of file rendercore.c.
References addps(), RenderPart::crop, ZBufSSSHandle::pa, ZBufSSSHandle::psmlist, RenderPart::rectall, RenderPart::rectbacko, RenderPart::rectbackp, RenderPart::rectbackz, RenderPart::recto, RenderPart::rectp, RenderPart::rectx, RenderPart::recty, RenderPart::rectz, and ZBufSSSHandle::totps.
Referenced by zbufshade_sss_tile().
static PixStrMain* addpsmain | ( | ListBase * | lb | ) | [static] |
Definition at line 888 of file rendercore.c.
References BLI_addtail(), PixStrMain::counter, MEM_mallocN(), and PixStrMain::ps.
Referenced by addps(), zbufshade_sss_tile(), and zbufshadeDA_tile().
static void atm_tile | ( | RenderPart * | pa, |
RenderLayer * | rl | ||
) | [static] |
Definition at line 713 of file rendercore.c.
References copy_v3_v3(), Render::disprect, RenderPart::disprect, SunSky::effect_type, ListBase::first, get_sample_layers(), LA_SUN, LA_SUN_EFFECT_AP, GroupObject::lampren, mul_v3_fl(), GroupObject::next, RenderPass::next, NULL, GroupObject::ob, Object::obmat, RenderLayer::passes, RenderPass::passtype, R, RE_MAX_OSA, RE_RenderLayerGetPass(), RenderLayer::rectf, RenderPart::rectz, SCE_PASS_Z, shadeAtmPixel(), LampRen::sunsky, LampRen::type, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by zbufshade_tile(), and zbufshadeDA_tile().
static void bake_displacement | ( | void * | handle, |
ShadeInput * | UNUSEDshi, | ||
float | dist, | ||
int | x, | ||
int | y | ||
) | [static] |
Definition at line 2198 of file rendercore.c.
References FILTER_MASK_USED, FTOCHAR, R, R_BAKE_NORMALIZE, BakeShade::rect, BakeShade::rect_float, BakeShade::rect_mask, and BakeShade::rectx.
Referenced by do_bake_shade().
static int bake_intersect_tree | ( | RayObject * | raytree, |
Isect * | isect, | ||
float * | start, | ||
float * | dir, | ||
float | sign, | ||
float * | hitco, | ||
float * | dist | ||
) | [static] |
Definition at line 2225 of file rendercore.c.
References Isect::dir, Isect::dist, madd_v3_v3v3fl(), mul_v3_v3fl(), R, RE_rayobject_raycast(), RE_RAYTRACE_MAXDIST, and Isect::start.
Referenced by do_bake_shade().
static void bake_set_shade_input | ( | ObjectInstanceRen * | obi, |
VlakRen * | vlr, | ||
ShadeInput * | shi, | ||
int | quad, | ||
int | UNUSEDisect, | ||
int | x, | ||
int | y, | ||
float | u, | ||
float | v | ||
) | [static] |
Definition at line 1999 of file rendercore.c.
References ShadeInput::flippednor, ShadeInput::mask, R, ShadeInput::samplenr, shade_input_flip_normals(), shade_input_set_normals(), shade_input_set_triangle_i(), shade_input_set_uv(), ShadeInput::thread, ShadeInput::u, ShadeInput::v, ShadeInput::view, ShadeInput::vn, ShadeInput::xs, and ShadeInput::ys.
Referenced by do_bake_shade().
static void bake_set_vlr_dxyco | ( | BakeShade * | bs, |
float * | uv1, | ||
float * | uv2, | ||
float * | uv3 | ||
) | [static] |
Definition at line 2253 of file rendercore.c.
References A, VertRen::co, BakeShade::dxco, BakeShade::dyco, fabsf, ObjectInstanceRen::flag, mul_m3_v3(), ObjectInstanceRen::nmat, BakeShade::obi, BakeShade::quad, R_TRANSFORMED, VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, and BakeShade::vlr.
Referenced by shade_tface().
static void bake_shade | ( | void * | handle, |
Object * | ob, | ||
ShadeInput * | shi, | ||
int | UNUSEDquad, | ||
int | x, | ||
int | y, | ||
float | UNUSEDu, | ||
float | UNUSEDv, | ||
float * | tvn, | ||
float * | ttang | ||
) | [static] |
Definition at line 2030 of file rendercore.c.
References ShadeInput::alpha, ShadeResult::alpha, ambient_occlusion(), ShadeInput::ao, ShadeInput::b, ShadeResult::combined, copy_v3_v3(), cross_v3_v3v3(), ELEM, ELEM3, ShadeInput::emit, environment_lighting_apply(), FILTER_MASK_USED, FTOCHAR, ShadeInput::g, Object::imat_ren, invert_m3_m3(), linearrgb_to_srgb(), VlakRen::mat, ShadeInput::mat, ShadeInput::mirb, ShadeInput::mirg, ShadeInput::mirr, mul_m3_v3(), mul_mat3_m4_v3(), mul_v3_fl(), ShadeInput::nmapnorm, ShadeInput::nmaptang, Material::nodetree, normalize_v3(), ntreeShaderExecTree(), ShadeInput::r, R, R_BAKE_NORMALIZE, R_BAKE_SPACE_CAMERA, R_BAKE_SPACE_OBJECT, R_BAKE_SPACE_TANGENT, R_BAKE_SPACE_WORLD, R_COLOR_MANAGEMENT, ShadeInput::ray_mirror, RE_BAKE_ALL, RE_BAKE_ALPHA, RE_BAKE_AO, RE_BAKE_EMIT, RE_BAKE_LIGHT, RE_BAKE_MIRROR_COLOR, RE_BAKE_MIRROR_INTENSITY, RE_BAKE_NORMALS, RE_BAKE_SHADOW, RE_BAKE_SPEC_COLOR, RE_BAKE_SPEC_INTENSITY, RE_BAKE_TEXTURE, BakeShade::rect, BakeShade::rect_float, BakeShade::rect_mask, BakeShade::rectx, ShadeResult::shad, shade_input_init_material(), shade_input_set_shade_texco(), shade_material_loop(), shade_samples_do_AO(), ShadeInput::spec, ShadeInput::specb, ShadeInput::specg, ShadeInput::specr, BakeShade::ssamp, BakeShade::type, Material::use_nodes, ShadeInput::vlr, ShadeInput::vn, and zero_v3().
Referenced by do_bake_shade().
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().
static int calchalo_z | ( | HaloRen * | har, |
int | zz | ||
) | [static] |
Definition at line 165 of file rendercore.c.
References HA_ONLYSKY, and HaloRen::type.
Referenced by halo_pixelstruct(), and halo_tile().
static void convert_to_key_alpha | ( | RenderPart * | pa, |
RenderLayer * | rl | ||
) | [static] |
Definition at line 971 of file rendercore.c.
References get_sample_layers(), RE_MAX_OSA, RenderLayer::rectf, RenderPart::rectx, and RenderPart::recty.
Referenced by zbufshade_tile(), and zbufshadeDA_tile().
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().
static void do_bake_shade | ( | void * | handle, |
int | x, | ||
int | y, | ||
float | u, | ||
float | v | ||
) | [static] |
Definition at line 2302 of file rendercore.c.
References BakeShade::actob, bake_displacement(), bake_intersect_tree(), bake_set_shade_input(), bake_shade(), Isect::check, co, ShadeInput::co, VertRen::co, copy_v3_v3(), copy_v4_v4(), BakeShade::dir, BakeShade::dxco, ShadeInput::dxco, BakeShade::dyco, ShadeInput::dyco, Isect::face, ObjectInstanceRen::flag, Isect::hit, Isect::isect, len_squared_v3v3(), ObjectInstanceRen::mat, Isect::mode, mul_m4_v3(), ShadeInput::nmapnorm, ShadeInput::nmaptang, Isect::ob, ObjectRen::ob, BakeShade::obi, ObjectInstanceRen::obr, Isect::orig, BakeShade::quad, R, R_BAKE_SPACE_TANGENT, R_TRANSFORMED, RE_BAKE_DISPLACEMENT, RE_BAKE_NORMALS, RE_CHECK_VLR_BAKE, RE_RAY_MIRROR, RE_SKIP_VLR_NEIGHBOUR, shade_input_set_shade_texco(), ShadeSample::shi, TNT::sign(), Isect::skip, BakeShade::ssamp, BakeShade::type, Isect::u, Isect::userdata, Isect::v, VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, BakeShade::vlr, and ShadeInput::vn.
Referenced by shade_tface().
static void* do_bake_thread | ( | void * | bs_v | ) | [static] |
Definition at line 2546 of file rendercore.c.
References BakeShade::do_update, get_next_bake_face(), NULL, R, BakeShade::ready, shade_tface(), and TRUE.
Referenced by RE_bake_shade_all_selected().
static void edge_enhance_add | ( | RenderPart * | pa, |
float * | rectf, | ||
float * | arect | ||
) | [static] |
Definition at line 952 of file rendercore.c.
References addAlphaOverFloat(), NULL, R, RenderPart::rectx, and RenderPart::recty.
Referenced by zbufshade_tile(), and zbufshadeDA_tile().
static void edge_enhance_tile | ( | RenderPart * | pa, |
float * | rectf, | ||
int * | rectz | ||
) | [static] |
Definition at line 993 of file rendercore.c.
References NULL, R, RenderPart::rectx, and RenderPart::recty.
Referenced by make_pixelstructs(), and zbufshade_tile().
static void freeps | ( | ListBase * | lb | ) | [static] |
Definition at line 901 of file rendercore.c.
References ListBase::first, ListBase::last, MEM_freeN(), PixStrMain::next, NULL, and PixStrMain::ps.
Referenced by zbufshade_sss_free(), and zbufshadeDA_tile().
static int get_next_bake_face | ( | BakeShade * | bs | ) | [static] |
Definition at line 2412 of file rendercore.c.
References BakeShade::actob, ObjectRen::bakemtface, BKE_image_get_ibuf(), BLI_lock_thread(), BLI_unlock_thread(), ImBuf::channels, ID::flag, Object::flag, Image::id, imb_freerectImBuf(), IMB_rectfill(), LIB_DOIT, LOCK_CUSTOM1, ObjectInstanceRen::next, NULL, ObjectRen::ob, BakeShade::obi, ObjectInstanceRen::obr, ImBuf::planes, R, R_BAKE_CLEAR, R_IMF_PLANES_RGBA, RE_findOrAddVlak(), RE_vlakren_get_tface(), ImBuf::rect, ImBuf::rect_float, SELECT, ObjectRen::totvlak, MTFace::tpage, BakeShade::vdone, and BakeShade::vlr.
Referenced by do_bake_thread(), and RE_bake_shade_all_selected().
int get_sample_layers | ( | RenderPart * | pa, |
RenderLayer * | rl, | ||
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().
static void halo_pixelstruct | ( | HaloRen * | har, |
RenderLayer ** | rlpp, | ||
int | totsample, | ||
int | od, | ||
float | dist, | ||
float | xn, | ||
float | yn, | ||
PixStr * | ps | ||
) | [static] |
Definition at line 179 of file rendercore.c.
References HaloRen::add, addalphaAddfacFloat(), calchalo_z(), count_mask(), HaloRen::flarec, MA_HALO_SOFT, PixStr::mask, HaloRen::mat, Material::mode, PixStr::next, R, shadeHaloFloat(), PixStr::z, and HaloRen::zs.
Referenced by halo_tile().
static void halo_tile | ( | RenderPart * | pa, |
RenderLayer * | rl | ||
) | [static] |
Definition at line 247 of file rendercore.c.
References HaloRen::add, addalphaAddfacFloat(), calchalo_z(), RenderPart::crop, RenderPart::disprect, Render::disprect, HaloRen::flarec, get_sample_layers(), halo_pixelstruct(), HaloRen::lay, RenderLayer::lay, Render::lay, MA_HALO_SOFT, HaloRen::mat, MAX2, HaloRen::maxy, MIN2, HaloRen::miny, Material::mode, NULL, R, HaloRen::rad, RE_MAX_OSA, RenderPart::rectdaps, RenderPart::rectx, RenderPart::rectz, shadeHaloFloat(), rcti::xmin, HaloRen::xs, rcti::ymin, HaloRen::ys, and HaloRen::zs.
Referenced by zbufshade_tile(), and zbufshadeDA_tile().
static void lamphalo_tile | ( | RenderPart * | pa, |
RenderLayer * | rl | ||
) | [static] |
Definition at line 329 of file rendercore.c.
References calc_renderco_ortho(), calc_renderco_zbuf(), calc_view_vector(), ShadeInput::co, count_mask(), RenderPart::disprect, Render::disprect, get_sample_layers(), PixStr::mask, PixStr::next, R, R_ORTHO, RE_MAX_OSA, RenderPart::rectdaps, RenderLayer::rectf, RenderPart::rectz, renderspothalo(), shade_input_initialize(), ShadeInput::view, rcti::xmax, rcti::xmin, rcti::ymax, rcti::ymin, and PixStr::z.
Referenced by zbufshade_tile(), and zbufshadeDA_tile().
static void make_pixelstructs | ( | RenderPart * | pa, |
ZSpan * | zspan, | ||
int | sample, | ||
void * | data | ||
) | [static] |
Definition at line 1134 of file rendercore.c.
References addps(), edge_enhance_tile(), ZbufSolidData::edgerect, RenderLayer::layflag, ZbufSolidData::psmlist, R, R_EDGE, RenderPart::rectdaps, ZSpan::rectmask, ZSpan::recto, ZSpan::rectp, RenderPart::rectx, RenderPart::recty, ZSpan::rectz, ZbufSolidData::rl, and SCE_LAY_EDGE.
Referenced by zbufshadeDA_tile().
static unsigned short* make_solid_mask | ( | RenderPart * | pa | ) | [static] |
Definition at line 1071 of file rendercore.c.
References PixStr::mask, MEM_mallocN(), PixStr::next, NULL, RenderPart::rectdaps, RenderPart::rectx, and RenderPart::recty.
Referenced by zbufshadeDA_tile().
void RE_bake_ibuf_filter | ( | ImBuf * | ibuf, |
char * | mask, | ||
const int | filter | ||
) |
Definition at line 2567 of file rendercore.c.
References BKE_alphatest_ibuf(), IMB_filter_extend(), IMB_rectfill_alpha(), ImBuf::planes, and R_IMF_PLANES_RGBA.
Referenced by finish_images(), and RE_bake_shade_all_selected().
int RE_bake_shade_all_selected | ( | Render * | re, |
int | type, | ||
Object * | actob, | ||
short * | do_update, | ||
float * | progress | ||
) |
Definition at line 2592 of file rendercore.c.
References BakeShade::actob, RenderData::bake_filter, BKE_image_get_ibuf(), BLI_end_threads(), BLI_init_threads(), BLI_insert_thread(), ShadeInput::combinedflag, do_bake_thread(), BakeShade::do_update, ID::flag, G, get_next_bake_face(), IB_BITMAPDIRTY, IB_PROFILE_LINEAR_RGB, Image::id, IMB_rect_from_float(), Render::lay, ShadeInput::lay, LIB_DOIT, MEM_callocN(), MEM_freeN(), ID::next, NULL, ShadeInput::passflag, PIL_sleep_ms(), ImBuf::profile, Render::r, R, RE_bake_ibuf_filter(), RE_BAKE_SHADOW, ImBuf::rect_float, SCE_PASS_COMBINED, SCE_PASS_SHADOW, SCE_PASS_SPEC, ShadeSample::shi, BakeShade::ssamp, ShadeInput::thread, RenderData::threads, threads, ShadeSample::tot, Render::totvlak, BakeShade::type, BakeShade::usemask, ImBuf::userdata, ImBuf::userflags, zbuf_free_span(), and BakeShade::zspan.
Referenced by bake_startjob(), and do_bake_render().
struct Image* RE_bake_shade_get_image | ( | void | ) | [read] |
static void renderflare | ( | RenderResult * | rr, |
float * | rectf, | ||
HaloRen * | har | ||
) | [static] |
Definition at line 1854 of file rendercore.c.
References HaloRen::alfa, HaloRen::b, fabs(), fabsf, Material::flareboost, HaloRen::flarec, Material::flaresize, HaloRen::g, HA_FLARECIRC, HaloRen::hard, hashvectf, HaloRen::linec, HaloRen::mat, HaloRen::pixels, HaloRen::r, R, R_ODDFIELD, R_SEC_FIELD, HaloRen::rad, HaloRen::radsq, renderhalo_post(), HaloRen::ringc, Material::seed2, sqrtf, Material::subsize, HaloRen::tex, HaloRen::type, HaloRen::xs, HaloRen::ys, and HaloRen::zs.
Referenced by add_halo_flare().
static void renderhalo_post | ( | RenderResult * | rr, |
float * | rectf, | ||
HaloRen * | har | ||
) | [static] |
Definition at line 1796 of file rendercore.c.
References HaloRen::add, addalphaAddfacFloat(), HaloRen::flarec, HaloRen::maxy, HaloRen::miny, R, HaloRen::rad, RenderResult::rectx, RenderResult::recty, shadeHaloFloat(), HaloRen::xs, and HaloRen::ys.
Referenced by renderflare().
static void reset_sky_speed | ( | RenderPart * | pa, |
RenderLayer * | rl | ||
) | [static] |
Definition at line 1053 of file rendercore.c.
References get_sample_layers(), NULL, PASS_VECTOR_MAX, RE_MAX_OSA, RE_RenderLayerGetPass(), RenderPart::rectx, RenderPart::recty, and SCE_PASS_VECTOR.
Referenced by zbufshade_tile(), and zbufshadeDA_tile().
static void shade_sample_sss | ( | ShadeSample * | ssamp, |
Material * | mat, | ||
ObjectInstanceRen * | obi, | ||
VlakRen * | vlr, | ||
int | quad, | ||
float | x, | ||
float | y, | ||
float | z, | ||
float * | co, | ||
float * | color, | ||
float * | area | ||
) | [static] |
Definition at line 1512 of file rendercore.c.
References calc_view_vector(), ShadeInput::co, ShadeResult::combined, copy_v3_v3(), ShadeInput::dxco, ShadeInput::dyco, ShadeInput::facenor, ShadeInput::flippednor, len_v3(), ShadeInput::mat, MIN2, negate_v3(), ShadeInput::nmapnorm, Material::nodetree, normalize_v3(), ObjectRen::ob, OB_NEG_SCALE, ShadeInput::obr, ShadeInput::osatex, R, ShadeInput::samplenr, shade_input_flip_normals(), shade_input_init_material(), shade_input_set_normals(), shade_input_set_shade_texco(), shade_input_set_triangle_i(), shade_input_set_uv(), shade_input_set_viewco(), shade_material_loop(), shade_samples_do_AO(), ShadeSample::shi, ShadeInput::thread, Object::transflag, Material::use_nodes, ShadeInput::vn, and ShadeInput::vno.
Referenced by zbufshade_sss_tile().
static void shade_tface | ( | BakeShade * | bs | ) | [static] |
Definition at line 2486 of file rendercore.c.
References bake_set_vlr_dxyco(), ObjectRen::bakemtface, BKE_image_get_ibuf(), BLI_lock_thread(), BLI_unlock_thread(), do_bake_shade(), BakeShade::ibuf, BakeShade::ima, LOCK_CUSTOM1, MEM_callocN(), NULL, BakeShade::obi, ObjectInstanceRen::obr, BakeShade::quad, R, RE_vlakren_get_tface(), ImBuf::rect, BakeShade::rect, ImBuf::rect_float, BakeShade::rect_float, BakeShade::rect_mask, BakeShade::rectx, BakeShade::recty, MTFace::tpage, BakeShade::usemask, ImBuf::userdata, MTFace::uv, VlakRen::v4, BakeShade::vlr, vlr_set_uv_indices(), ImBuf::x, ImBuf::y, zbuf_alloc_span(), zbuf_free_span(), BakeShade::zspan, and zspan_scanconvert().
Referenced by do_bake_thread().
static void shadeDA_tile | ( | RenderPart * | pa, |
RenderLayer * | rl | ||
) | [static] |
Definition at line 803 of file rendercore.c.
References add_filt_passes(), add_passes(), BLI_thread_srandom(), cache_occ_samples(), RenderPart::crop, Render::disprect, RenderPart::disprect, ListBase::first, free_occ_samples(), RenderPart::fullresult, ISB_create(), ISB_free(), ShadeInput::mask, NULL, offs, R, R_SHADOW, RenderPart::rectdaps, RenderPart::rectx, RenderResult::renlay, RenderResult::renrect, RenderPart::result, ShadeSample::rlpp, shade_sample_initialize(), shade_samples(), ShadeSample::shi, ShadeSample::shr, RenderPart::thread, ShadeSample::tot, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by zbufshadeDA_tile().
static void sky_tile | ( | RenderPart * | pa, |
RenderLayer * | rl | ||
) | [static] |
Definition at line 673 of file rendercore.c.
References addAlphaUnderFloat(), copy_v4_v4(), Render::disprect, RenderPart::disprect, get_sample_layers(), R, R_ADDSKY, RE_MAX_OSA, RenderLayer::rectf, shadeSkyPixel(), RenderPart::thread, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by zbufshade_tile(), and zbufshadeDA_tile().
static void zbufshade_sss_free | ( | RenderPart * | pa | ) | [static] |
Definition at line 1585 of file rendercore.c.
References freeps(), MEM_freeN(), NULL, RenderPart::rectall, RenderPart::rectbacko, RenderPart::rectbackp, RenderPart::rectbackz, RenderPart::recto, RenderPart::rectp, and RenderPart::rectz.
Referenced by zbufshade_sss_tile().
void zbufshade_sss_tile | ( | 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, RenderLayer::lay, ShadeInput::lay, RenderResult::layers, RenderLayer::layflag, ShadeInput::layflag, ShadeInput::light_override, ShadeInput::mat_override, MEM_callocN(), MEM_freeN(), MEM_mallocN(), RenderData::mode, PixStr::next, RenderLayer::next, NULL, PixStr::obi, Render::objectinstance, ObjectInstanceRen::obr, ZBufSSSHandle::pa, RenderLayer::pass_xor, RenderLayer::passflag, ShadeInput::passflag, ZBufSSSHandle::psmlist, Render::r, 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 | ( | 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_tile | ( | 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().
Definition at line 127 of file pipeline.c.