Merge remote-tracking branch 'origin/blender-v4.3-release'

This commit is contained in:
Ray Molenkamp
2024-11-04 11:45:11 -07:00
3 changed files with 15 additions and 1 deletions

View File

@@ -159,6 +159,12 @@ void Camera::sync()
params.viewplane,
overscan_,
data.winmat.ptr());
if (params.lens == 0.0f) {
/* Can happen for the case of XR.
* In this case the produced winmat is degenerate. So just revert to the input matrix. */
DRW_view_winmat_get(inst_.drw_view, data.winmat.ptr(), false);
}
}
else if (inst_.render) {
const Render *re = inst_.render->re;

View File

@@ -1852,6 +1852,11 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
/* Actually not used since we pass in the projection matrix. */
v3d.lens = 0;
/* WORKAROUND: Disable overscan because it is not supported for arbitrary input matrices.
* The proper fix to this would be to support arbitrary matrices in `eevee::Camera::sync()`. */
float overscan = scene->eevee.overscan;
scene->eevee.overscan = 0.0f;
ED_view3d_draw_offscreen(depsgraph,
scene,
drawtype,
@@ -1868,6 +1873,9 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
true,
ofs,
viewport);
/* Restore overscan. */
scene->eevee.overscan = overscan;
}
ImBuf *ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph,