Blender V2.61 - r43446
|
#include <math.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "DNA_group_types.h"
#include "DNA_image_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_image.h"
#include "BKE_texture.h"
#include "render_types.h"
#include "renderpipeline.h"
#include "envmap.h"
#include "rendercore.h"
#include "renderdatabase.h"
#include "texture.h"
#include "zbuf.h"
#include "initrender.h"
Go to the source code of this file.
Functions | |
static void | envmap_split_ima (EnvMap *env, ImBuf *ibuf) |
static Render * | envmap_render_copy (Render *re, EnvMap *env) |
static void | envmap_free_render_copy (Render *envre) |
static void | envmap_transmatrix (float mat[][4], int part) |
static void | env_rotate_scene (Render *re, float mat[][4], int mode) |
static void | env_layerflags (Render *re, unsigned int notlay) |
static void | env_hideobject (Render *re, Object *ob) |
static void | env_showobjects (Render *re) |
static void | env_set_imats (Render *re) |
static void | render_envmap (Render *re, EnvMap *env) |
void | make_envmaps (Render *re) |
static int | envcube_isect (EnvMap *env, float *vec, float *answ) |
static void | set_dxtdyt (float *dxts, float *dyts, float *dxt, float *dyt, int face) |
int | envmaptex (Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexResult *texres) |
Definition in file envmap.c.
Definition at line 354 of file envmap.c.
References ListBase::first, VlakRen::flag, ObjectRen::next, NULL, ObjectRen::ob, Render::objecttable, R_HIDDEN, ObjectRen::totvlak, VlakTableNode::vlak, and ObjectRen::vlaknodes.
Referenced by render_envmap().
static void env_layerflags | ( | Render * | re, |
unsigned int | notlay | ||
) | [static] |
Definition at line 326 of file envmap.c.
References ListBase::first, VlakRen::flag, ObjectRen::lay, ObjectRen::next, NULL, Render::objecttable, R_HIDDEN, ObjectRen::totvlak, VlakTableNode::vlak, and ObjectRen::vlaknodes.
Referenced by render_envmap().
static void env_rotate_scene | ( | Render * | re, |
float | mat[][4], | ||
int | mode | ||
) | [static] |
Definition at line 243 of file envmap.c.
References ObjectRen::bloha, LampRen::co, HaloRen::co, copy_m3_m3(), copy_m3_m4(), copy_m4_m4(), ListBase::first, ObjectInstanceRen::flag, LampRen::imat, Render::instancetable, invert_m3_m3(), invert_m4_m4(), GroupObject::lampren, Render::lights, ObjectInstanceRen::mat, mul_m3_m3m3(), mul_m3_v3(), mul_m4_v3(), mult_m4_m4m4(), GroupObject::next, ObjectInstanceRen::next, ObjectRen::next, ObjectInstanceRen::nmat, NULL, Render::objecttable, ShadBuf::persmat, R_DUPLI_TRANSFORMED, R_ENV_TRANSFORMED, LampRen::sh_invcampos, LampRen::sh_zfac, LampRen::shb, ObjectRen::tothalo, transpose_m3(), unit_m4(), LampRen::vec, ShadBuf::viewmat, and ShadBuf::winmat.
Referenced by render_envmap().
static void env_set_imats | ( | Render * | re | ) | [static] |
Definition at line 389 of file envmap.c.
References Scene::base, ListBase::first, Object::imat, invert_m4_m4(), mult_m4_m4m4(), Base::next, Base::object, Object::obmat, Render::scene, and Render::viewmat.
Referenced by render_envmap().
static void env_showobjects | ( | Render * | re | ) | [static] |
Definition at line 371 of file envmap.c.
References ListBase::first, VlakRen::flag, ObjectRen::next, NULL, Render::objecttable, R_HIDDEN, ObjectRen::totvlak, VlakTableNode::vlak, and ObjectRen::vlaknodes.
Referenced by render_envmap().
static int envcube_isect | ( | EnvMap * | env, |
float * | vec, | ||
float * | answ | ||
) | [static] |
Definition at line 584 of file envmap.c.
References ENV_PLANE, fabsf, EnvMap::type, and EnvMap::viewscale.
Referenced by envmaptex().
static void envmap_free_render_copy | ( | Render * | envre | ) | [static] |
Definition at line 188 of file envmap.c.
References Render::customdata_names, ListBase::first, Render::instancetable, ListBase::last, Render::lights, NULL, Render::objectinstance, Render::objecttable, Render::qmcsamplers, Render::raytree, RE_FreeRender(), Render::sortedhalos, Render::tothalo, Render::totinstance, Render::totlamp, Render::totstrand, Render::totvert, and Render::totvlak.
Referenced by render_envmap().
Definition at line 131 of file envmap.c.
References EnvMap::clipend, EnvMap::clipsta, EnvMap::cuberes, Render::customdata_names, Render::ddh, Render::display_draw, ENV_PLANE, RenderData::filtertype, ListBase::first, Render::flag, Render::instancetable, ListBase::last, EnvMap::lastsize, Render::lay, RenderData::layers, Render::lights, RenderData::mode, NULL, EnvMap::object, Render::objectinstance, Render::objecttable, Render::qmcsamplers, Render::r, R_BORDER, R_MBLUR, R_ORTHO, R_PANORAMA, Render::raytree, RE_InitState(), RE_NewRender(), RE_SetEnvmapCamera(), Render::scene, RenderData::size, Render::sortedhalos, Render::tbh, Render::test_break, Render::tothalo, Render::totinstance, Render::totlamp, Render::totstrand, Render::totvert, Render::totvlak, EnvMap::type, EnvMap::viewscale, RenderData::xasp, RenderData::xparts, RenderData::yasp, and RenderData::yparts.
Referenced by render_envmap().
Definition at line 73 of file envmap.c.
References BKE_free_envmapdata(), BLI_lock_thread(), BLI_unlock_thread(), EnvMap::cube, ENV_CUBE, ENV_OSA, ENV_PLANE, IB_rect, IB_rectfloat, EnvMap::ima, IMB_allocImBuf(), IMB_dupImBuf(), IMB_float_from_rect(), IMB_rectcpy(), LOCK_IMAGE, NULL, Image::ok, EnvMap::ok, EnvMap::type, ImBuf::x, and ImBuf::y.
Referenced by envmaptex().
static void envmap_transmatrix | ( | float | mat[][4], |
int | part | ||
) | [static] |
Definition at line 211 of file envmap.c.
References copy_m4_m4(), eul_to_mat4(), M_PI, mul_serie_m4(), and NULL.
Referenced by render_envmap().
int envmaptex | ( | Tex * | tex, |
float * | texvec, | ||
float * | dxt, | ||
float * | dyt, | ||
int | osatex, | ||
TexResult * | texres | ||
) |
Definition at line 667 of file envmap.c.
References add_v3_v3(), BKE_image_get_ibuf(), copy_v3_v3(), EnvMap::cube, Tex::env, ENV_LOAD, envcube_isect(), envmap_split_ima(), Tex::ima, EnvMap::ima, imagewrap(), imagewraposa(), mul_m3_v3(), mul_mat3_m4_v3(), TexResult::nor, NULL, EnvMap::obimat, EnvMap::object, EnvMap::ok, Image::ok, R, set_dxtdyt(), EnvMap::stype, sub_v3_v3(), TexResult::ta, TexResult::talpha, TexResult::tb, TexResult::tg, TexResult::tin, TexResult::tr, and Render::viewinv.
Referenced by multitex().
void make_envmaps | ( | Render * | re | ) |
Definition at line 500 of file envmap.c.
References BKE_free_envmapdata(), copy_m3_m4(), copy_m4_m4(), Render::dch, EnvMap::depth, Render::dih, Render::display_clear, Render::display_init, Tex::env, ENV_LOAD, ENV_NORMAL, ListBase::first, Render::i, Tex::id, RenderStats::infostr, invert_m4_m4(), EnvMap::lastsize, Object::lay, Render::lay, Render::main, RenderData::mode, mult_m4_m4m4(), ID::next, normalize_m4(), EnvMap::obimat, EnvMap::object, Object::obmat, EnvMap::ok, Render::r, R_ENVMAP, R_OSA, R_RAYTRACE, EnvMap::recalc, render_envmap(), Render::result, Render::sdh, RenderData::size, Render::stats_draw, EnvMap::stype, Main::tex, TEX_ENVMAP, trace, Tex::type, ID::us, and Render::viewmat.
Referenced by RE_Database_FromScene().
Definition at line 406 of file envmap.c.
References BKE_free_envmapdata(), RenderData::cfra, ImBuf::channels, RenderData::color_mgt_flag, copy_m3_m4(), copy_m4_m4(), EnvMap::cube, Render::dch, Render::display_clear, env_hideobject(), env_layerflags(), ENV_NORMAL, ENV_OSA, ENV_PLANE, env_rotate_scene(), env_set_imats(), env_showobjects(), envmap_free_render_copy(), envmap_render_copy(), envmap_transmatrix(), ListBase::first, IB_PROFILE_LINEAR_RGB, IB_rect, IB_rectfloat, EnvMap::imat, IMB_allocImBuf(), init_render_world(), invert_m4_m4(), EnvMap::lastframe, RenderResult::layers, RenderData::mode, mult_m4_m4m4(), normalize_m4(), EnvMap::notlay, EnvMap::obimat, EnvMap::object, Object::obmat, EnvMap::ok, ImBuf::profile, project_renderdata(), projectverto(), Scene::r, Render::r, R_COLOR_MANAGEMENT, R_OSA, RE_TileProcessor(), ImBuf::rect_float, RenderLayer::rectf, Render::rectx, Render::recty, Render::result, Render::scene, Render::tbh, Render::test_break, EnvMap::type, Render::viewinv, Render::viewmat, ImBuf::x, and ImBuf::y.
Referenced by make_envmaps().
static void set_dxtdyt | ( | float * | dxts, |
float * | dyts, | ||
float * | dxt, | ||
float * | dyt, | ||
int | face | ||
) | [static] |
Definition at line 643 of file envmap.c.
Referenced by envmaptex().