From 7fabe30b5968d69f62a3f9192b5352228828aac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Sun, 10 Feb 2019 17:25:58 +0200 Subject: [PATCH] Fixed|Renderer: Black segments visible in the sky Don't clip with polyobj walls in a sky-ceiling sector. Calls for a closer investigation as to why the sky gets occluded if this check is disabled. IssueID #2306 --- doomsday/apps/client/src/render/rend_main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doomsday/apps/client/src/render/rend_main.cpp b/doomsday/apps/client/src/render/rend_main.cpp index 954b70ca0a..ec73667623 100644 --- a/doomsday/apps/client/src/render/rend_main.cpp +++ b/doomsday/apps/client/src/render/rend_main.cpp @@ -3366,6 +3366,19 @@ static void writeAllWalls(HEdge &hedge) // is not in the void). if (!P_IsInVoid(viewPlayer) && coveredOpenRange(hedge, middleBottomZ, middleTopZ, wroteOpaqueMiddle)) { + if (hedge.hasMapElement()) + { + // IssueID #2306: Black segments appear in the sky due to polyobj walls being marked + // as occluding angle ranges. As a workaround, don't consider these walls occluding. + if (hedge.mapElementAs().line().definesPolyobj()) + { + const Polyobj &poly = hedge.mapElementAs().line().polyobj(); + if (poly.sector().ceiling().surface().hasSkyMaskedMaterial()) + { + return; + } + } + } ClientApp::renderSystem().angleClipper().addRangeFromViewRelPoints(hedge.origin(), hedge.twin().origin()); } }