Skip to content

Commit

Permalink
Fixed|Renderer: Black segments visible in the sky
Browse files Browse the repository at this point in the history
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
  • Loading branch information
skyjake committed Feb 10, 2019
1 parent 1c7e8f7 commit 7fabe30
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doomsday/apps/client/src/render/rend_main.cpp
Expand Up @@ -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<LineSideSegment>().line().definesPolyobj())
{
const Polyobj &poly = hedge.mapElementAs<LineSideSegment>().line().polyobj();
if (poly.sector().ceiling().surface().hasSkyMaskedMaterial())
{
return;
}
}
}
ClientApp::renderSystem().angleClipper().addRangeFromViewRelPoints(hedge.origin(), hedge.twin().origin());
}
}
Expand Down

0 comments on commit 7fabe30

Please sign in to comment.