Blender V2.61 - r43446
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "MEM_guardedalloc.h"
#include "PIL_time.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_jitter.h"
#include "BLI_utildefines.h"
#include "DNA_camera_types.h"
#include "DNA_group_types.h"
#include "DNA_image_types.h"
#include "DNA_lamp_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_camera.h"
#include "BKE_global.h"
#include "BKE_material.h"
#include "BKE_object.h"
#include "BKE_image.h"
#include "BKE_ipo.h"
#include "BKE_key.h"
#include "BKE_action.h"
#include "BKE_writeavi.h"
#include "BKE_scene.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "renderpipeline.h"
#include "render_types.h"
#include "rendercore.h"
#include "pixelshading.h"
#include "zbuf.h"
#include "initrender.h"
Go to the source code of this file.
Functions | |
static void | init_render_jit (Render *re) |
static float | filt_quadratic (float x) |
static float | filt_cubic (float x) |
static float | filt_catrom (float x) |
static float | filt_mitchell (float x) |
float | RE_filter_value (int type, float x) |
static float | calc_weight (Render *re, float *weight, int i, int j) |
void | free_sample_tables (Render *re) |
void | make_sample_tables (Render *re) |
struct Object * | RE_GetCamera (Render *re) |
static void | re_camera_params_get (Render *re, CameraParams *params, Object *cam_ob) |
void | RE_SetEnvmapCamera (Render *re, Object *cam_ob, float viewscale, float clipsta, float clipend) |
void | RE_SetCamera (Render *re, Object *cam_ob) |
void | RE_SetPixelSize (Render *re, float pixsize) |
void | RE_GetCameraWindow (struct Render *re, struct Object *camera, int frame, float mat[][4]) |
void | freeparts (Render *re) |
void | initparts (Render *re) |
Definition in file initrender.c.
static float calc_weight | ( | Render * | re, |
float * | weight, | ||
int | i, | ||
int | j | ||
) | [static] |
Definition at line 198 of file initrender.c.
References expf, filt_catrom(), filt_cubic(), filt_mitchell(), filt_quadratic(), RenderData::filtertype, RenderData::gauss, i, Render::jit, Render::osa, Render::r, R_FILTER_BOX, R_FILTER_CATROM, R_FILTER_CUBIC, R_FILTER_GAUSS, R_FILTER_MITCH, R_FILTER_QUAD, R_FILTER_TENT, and sqrt().
Referenced by make_sample_tables().
static float filt_catrom | ( | float | x | ) | [static] |
Definition at line 134 of file initrender.c.
Referenced by calc_weight(), and RE_filter_value().
static float filt_cubic | ( | float | x | ) | [static] |
Definition at line 122 of file initrender.c.
Referenced by calc_weight(), and RE_filter_value().
static float filt_mitchell | ( | float | x | ) | [static] |
Definition at line 144 of file initrender.c.
Referenced by calc_weight(), and RE_filter_value().
static float filt_quadratic | ( | float | x | ) | [static] |
Definition at line 113 of file initrender.c.
Referenced by calc_weight(), and RE_filter_value().
void free_sample_tables | ( | Render * | re | ) |
Definition at line 250 of file initrender.c.
References SampleTables::centmask, SampleTables::fmask1, SampleTables::fmask2, MEM_freeN(), NULL, and Render::samples.
Referenced by make_sample_tables(), and RE_FreeRender().
void freeparts | ( | Render * | re | ) |
Definition at line 530 of file initrender.c.
References BLI_freelistN(), ListBase::first, MEM_freeN(), RenderPart::next, Render::parts, RenderPart::rectp, and RenderPart::rectz.
Referenced by initparts(), and threaded_tile_processor().
static void init_render_jit | ( | Render * | re | ) | [static] |
Definition at line 88 of file initrender.c.
References BLI_initjit(), jit, Render::jit, Render::mblur_jit, RenderData::mblur_samples, RenderData::osa, and Render::r.
Referenced by make_sample_tables().
void initparts | ( | Render * | re | ) |
Definition at line 542 of file initrender.c.
References BLI_addtail(), RenderPart::crop, RenderStats::curpart, RenderPart::disprect, Render::disprect, RenderData::filtertype, freeparts(), Render::i, MEM_callocN(), RenderData::mode, Render::panophi, panorama_pixel_rot(), Render::parts, RenderStats::partsdone, Render::partx, Render::party, Render::r, R_EDGE, R_EXR_TILE_FILE, R_FULL_SAMPLE, R_PANORAMA, RenderPart::rectx, Render::rectx, RenderPart::recty, Render::recty, RenderData::scemode, RenderStats::totpart, rcti::xmax, rcti::xmin, Render::xparts, RenderData::xparts, rcti::ymax, rcti::ymin, Render::yparts, and RenderData::yparts.
Referenced by threaded_tile_processor().
void make_sample_tables | ( | Render * | re | ) |
Definition at line 267 of file initrender.c.
References calc_weight(), SampleTables::centLut, SampleTables::centmask, CLAMP(), SampleTables::cmask, RenderData::filtertype, SampleTables::fmask1, SampleTables::fmask2, free_sample_tables(), i, init_render_jit(), Render::jit, MEM_callocN(), MEM_freeN(), MEM_mallocN(), Render::osa, Render::r, Render::samples, and simple_enum_gen::val.
Referenced by RE_InitState().
static void re_camera_params_get | ( | Render * | re, |
CameraParams * | params, | ||
Object * | cam_ob | ||
) | [static] |
Definition at line 454 of file initrender.c.
References CameraParams::clipend, Render::clipend, CameraParams::clipsta, Render::clipsta, copy_m4_m4(), object_camera_mode(), Render::r, CameraParams::viewdx, Render::viewdx, CameraParams::viewdy, Render::viewdy, Render::viewplane, CameraParams::viewplane, Render::winmat, CameraParams::winmat, CameraParams::ycor, and Render::ycor.
Referenced by RE_SetCamera(), and RE_SetEnvmapCamera().
float RE_filter_value | ( | int | type, |
float | x | ||
) |
Definition at line 164 of file initrender.c.
References ABS, expf, filt_catrom(), filt_cubic(), filt_mitchell(), filt_quadratic(), R_FILTER_BOX, R_FILTER_CATROM, R_FILTER_CUBIC, R_FILTER_GAUSS, R_FILTER_MITCH, R_FILTER_QUAD, and R_FILTER_TENT.
Referenced by bokeh_single_image(), make_gausstab(), and make_jitter_weight_tab().
Definition at line 449 of file initrender.c.
References Scene::camera, Render::camera_override, and Render::scene.
Referenced by database_fromscene_vectors(), do_render_fields_3d(), do_render_fields_blur_3d(), do_write_image_or_movie(), RE_Database_Baking(), RE_Database_FromScene(), RE_make_stars(), RE_PreviewRender(), render_new_particle_system(), renderresult_stampinfo(), and tag_scenes_for_render().
Definition at line 520 of file initrender.c.
References RenderData::cfra, copy_m4_m4(), Render::r, RE_SetCamera(), and Render::winmat.
Referenced by screen_opengl_render_apply().
Definition at line 494 of file initrender.c.
References camera_params_compute_matrix(), camera_params_compute_viewplane(), camera_params_from_object(), camera_params_init(), CameraParams::field_odd, CameraParams::field_second, Render::flag, RenderData::mode, Render::r, R_FIELDS, R_ODDFIELD, R_SEC_FIELD, re_camera_params_get(), CameraParams::use_fields, Render::winx, Render::winy, RenderData::xasp, and RenderData::yasp.
Referenced by do_render_fields_3d(), do_render_fields_blur_3d(), RE_Database_FromScene(), RE_GetCameraWindow(), RE_make_sticky(), and RE_PreviewRender().
void RE_SetEnvmapCamera | ( | Render * | re, |
Object * | cam_ob, | ||
float | viewscale, | ||
float | clipsta, | ||
float | clipend | ||
) |
Definition at line 469 of file initrender.c.
References camera_params_compute_matrix(), camera_params_compute_viewplane(), camera_params_from_object(), camera_params_init(), CAMERA_SENSOR_FIT_AUTO, CameraParams::clipend, CameraParams::clipsta, CameraParams::lens, re_camera_params_get(), CameraParams::sensor_fit, CameraParams::sensor_x, CameraParams::sensor_y, Render::winx, and Render::winy.
Referenced by envmap_render_copy().
void RE_SetPixelSize | ( | Render * | re, |
float | pixsize | ||
) |
Definition at line 514 of file initrender.c.
References Render::viewdx, Render::viewdy, and Render::ycor.