Skip to content

Commit

Permalink
Comments: add more info on the BSP renderer node loop
Browse files Browse the repository at this point in the history
  • Loading branch information
yoctozepto committed Oct 30, 2024
1 parent c840a81 commit aba3d53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Engine/Graphics/BspRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ void BspRenderer::AddFaceToRenderList_d3d(int node_id, int uFaceID) {
};

// avoid circular loops in portals
// a loop is triggered in "Mercenary Guild", see issue #417
// NOTE(yoctozepto): based on other code, we should avoid having the same sector id in two nodes as this
// causes faces to be added twice, yet simplifying this statement causes rendering issues
// in some places, notably the upper, open corridor in "Temple of Light" because it offers
// several ways (portals) to "look" at faces and some might be more limited in sight than others;
// see PR #1850 for the discussion and save file
// see PR #1850 and issue #1704 for the discussion and save file
for (int test = 0; test < num_nodes; test++) {
if (nodes[test].uSectorID == nodes[num_nodes].uSectorID &&
nodes[test].uFaceID == nodes[num_nodes].uFaceID &&
Expand Down

0 comments on commit aba3d53

Please sign in to comment.