Correct own mistake in near/far cleanup

Error in 2f737c4f47
This commit is contained in:
Campbell Barton 2019-02-18 08:46:10 +11:00
parent de13d0a80c
commit 4bbd1b9610
Notes: blender-bot 2023-02-14 09:03:55 +01:00
Referenced by issue #61632, Clip Start value in orthographic view
Referenced by issue #61609, Weird clip start from 3d ortographic views
1 changed files with 3 additions and 2 deletions

View File

@ -240,8 +240,9 @@ void BKE_camera_params_from_view3d(CameraParams *params, Depsgraph *depsgraph, c
else if (rv3d->persp == RV3D_ORTHO) {
/* orthographic view */
float sensor_size = BKE_camera_sensor_size(params->sensor_fit, params->sensor_x, params->sensor_y);
params->clip_end *= 0.5f; // otherwise too extreme low zbuffer quality
params->clip_start = -params->clip_start;
/* Halve, otherwise too extreme low zbuffer quality. */
params->clip_end *= 0.5f;
params->clip_start = -params->clip_end;
params->is_ortho = true;
/* make sure any changes to this match ED_view3d_radius_to_dist_ortho() */