BKE_camera_multiview_model_matrix: Add _scaled version
For drawing it is useful to have the non-normalized version of the matrix. So we can scale up the cameras drawing accordingly.
This commit is contained in:
@@ -140,6 +140,7 @@ void BKE_camera_to_gpu_dof(struct Object *camera, struct GPUFXSettings *r_fx_set
|
||||
struct Object *BKE_camera_multiview_render(struct Scene *scene, struct Object *camera, const char *viewname);
|
||||
void BKE_camera_multiview_view_matrix(struct RenderData *rd, const struct Object *camera, const bool is_left, float r_viewmat[4][4]);
|
||||
void BKE_camera_multiview_model_matrix(struct RenderData *rd, const struct Object *camera, const char *viewname, float r_modelmat[4][4]);
|
||||
void BKE_camera_multiview_model_matrix_scaled(struct RenderData *rd, const struct Object *camera, const char *viewname, float r_modelmat[4][4]);
|
||||
float BKE_camera_multiview_shift_x(struct RenderData *rd, const struct Object *camera, const char *viewname);
|
||||
void BKE_camera_multiview_params(struct RenderData *rd, struct CameraParams *params, const struct Object *camera, const char *viewname);
|
||||
bool BKE_camera_multiview_spherical_stereo(struct RenderData *rd, const struct Object *camera);
|
||||
|
||||
@@ -777,6 +777,12 @@ static bool camera_is_left(const char *viewname)
|
||||
}
|
||||
|
||||
void BKE_camera_multiview_model_matrix(RenderData *rd, const Object *camera, const char *viewname, float r_modelmat[4][4])
|
||||
{
|
||||
BKE_camera_multiview_model_matrix_scaled(rd, camera, viewname, r_modelmat);
|
||||
normalize_m4(r_modelmat);
|
||||
}
|
||||
|
||||
void BKE_camera_multiview_model_matrix_scaled(RenderData *rd, const Object *camera, const char *viewname, float r_modelmat[4][4])
|
||||
{
|
||||
const bool is_multiview = (rd && rd->scemode & R_MULTIVIEW) != 0;
|
||||
|
||||
@@ -790,7 +796,6 @@ void BKE_camera_multiview_model_matrix(RenderData *rd, const Object *camera, con
|
||||
const bool is_left = camera_is_left(viewname);
|
||||
camera_stereo3d_model_matrix(camera, is_left, r_modelmat);
|
||||
}
|
||||
normalize_m4(r_modelmat);
|
||||
}
|
||||
|
||||
bool BKE_camera_multiview_spherical_stereo(RenderData *rd, const Object *camera)
|
||||
|
||||
Reference in New Issue
Block a user