1
1

Fix T87832: Incorrect FOV in line art when sensor fit is not Auto.

Reviewed by Sebastian Parborg

https://developer.blender.org/D11095
This commit is contained in:
2021-04-27 11:26:44 +08:00
parent e714b3a1c3
commit 4ddff574d7

View File

@@ -1817,8 +1817,23 @@ static void lineart_main_load_geometries(
double asp = ((double)rb->w / (double)rb->h);
if (cam->type == CAM_PERSP) {
if (asp < 1) {
fov /= asp;
if (cam->sensor_fit == CAMERA_SENSOR_FIT_AUTO) {
if (asp < 1) {
fov /= asp;
}
else {
fov *= asp;
}
}
else if (cam->sensor_fit == CAMERA_SENSOR_FIT_HOR) {
if (asp < 1) {
fov /= asp;
}
}
else if (cam->sensor_fit == CAMERA_SENSOR_FIT_VERT) {
if (asp > 1) {
fov *= asp;
}
}
lineart_matrix_perspective_44d(proj, fov, asp, cam->clip_start, cam->clip_end);
}