35 return 0.75f - (x *
x);
38 return 0.50f * (x - 1.5f) * (x - 1.5f);
52 return 0.5f * x * x2 - x2 + 2.0f / 3.0f;
55 return (2.0f - x) * (2.0f -
x) * (2.0f - x) / 6.0f;
68 return 1.5f * x2 * x - 2.5f * x2 + 1.0f;
71 return -0.5f * x2 * x + 2.5f * x2 - 4.0f * x + 2.0f;
78 float b = 1.0f / 3.0f, c = 1.0f / 3.0f;
79 float p0 = (6.0f - 2.0f *
b) / 6.0f;
80 float p2 = (-18.0f + 12.0f *
b + 6.0f * c) / 6.0f;
81 float p3 = (12.0f - 9.0f *
b - 6.0f * c) / 6.0f;
82 float q0 = (8.0f *
b + 24.0f * c) / 6.0f;
83 float q1 = (-12.0f *
b - 48.0f * c) / 6.0f;
84 float q2 = (6.0f *
b + 30.0f * c) / 6.0f;
85 float q3 = (-
b - 6.0f * c) / 6.0f;
91 return (q0 - x * (
q1 - x * (q2 - x * q3)));
94 return (p0 + x * x * (p2 - x * p3));
97 return (p0 + x * x * (p2 + x * p3));
100 return (q0 + x * (
q1 + x * (q2 + x * q3)));
107 float gaussfac = 1.6f;
126 const float two_gaussfac2 = 2.0f * gaussfac * gaussfac;
127 x *= 3.0f * gaussfac;
128 return 1.0f /
sqrtf(
float(
M_PI) * two_gaussfac2) *
expf(-x * x / two_gaussfac2);
201 float r_winmat[4][4])
204 params.is_ortho = is_ortho;
205 params.clip_start = clip_start;
206 params.clip_end = clip_end;
207 params.viewplane = viewplane;
211 params.viewplane.xmin -= overscan;
212 params.viewplane.xmax += overscan;
213 params.viewplane.ymin -= overscan;
214 params.viewplane.ymax += overscan;
Camera data-block and utility functions.
void BKE_camera_multiview_params(const struct RenderData *rd, struct CameraParams *params, const struct Object *camera, const char *viewname)
struct Object * BKE_camera_multiview_render(const struct Scene *scene, struct Object *camera, const char *viewname)
void BKE_camera_params_init(CameraParams *params)
void BKE_camera_multiview_model_matrix(const struct RenderData *rd, const struct Object *camera, const char *viewname, float r_modelmat[4][4])
void BKE_camera_params_from_object(CameraParams *params, const struct Object *cam_ob)
void BKE_camera_params_compute_viewplane(CameraParams *params, int winx, int winy, float aspx, float aspy)
void BKE_camera_params_compute_matrix(CameraParams *params)
MINLINE float max_ff(float a, float b)
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
Read Guarded memory(de)allocation.
local_group_size(16, 16) .push_constant(Type b
void RE_GetCameraModelMatrix(const Render *re, const Object *camera, float r_modelmat[4][4])
static float filt_cubic(float x)
void RE_GetCameraWindowWithOverscan(const Render *re, float overscan, float r_winmat[4][4])
void RE_GetViewPlane(Render *re, rctf *r_viewplane, rcti *r_disprect)
void RE_GetCameraWindow(Render *re, const Object *camera, float r_winmat[4][4])
void RE_GetWindowMatrixWithOverscan(bool is_ortho, float clip_start, float clip_end, rctf viewplane, float overscan, float r_winmat[4][4])
void RE_SetCamera(Render *re, const Object *cam_ob)
void RE_SetOverrideCamera(Render *re, Object *cam_ob)
Object * RE_GetCamera(Render *re)
static float filt_catrom(float x)
static float filt_quadratic(float x)
static float filt_mitchell(float x)
float RE_filter_value(int type, float x)
struct Object * camera_override