diff --git a/src/gl/scene/gl_portal.cpp b/src/gl/scene/gl_portal.cpp index 6082c6f4f4..b95e1fee0f 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -756,6 +756,15 @@ void GLSectorStackPortal::DrawContents() SaveMapSection(); SetupCoverage(); ClearClipper(); + + // If the viewpoint is not within the portal, we need to invalidate the entire clip area. + // The portal will re-validate the necessary parts when its subsectors get traversed. + subsector_t *sub = R_PointInSubsector(ViewPos); + if (!(gl_drawinfo->ss_renderflags[sub - ::subsectors] & SSRF_SEEN)) + { + clipper.SafeAddClipRange(0, ANGLE_MAX); + } + GLRenderer->DrawScene(DM_PORTAL); RestoreMapSection();