: GZDoom can now support 5D spaces with portals, too.
GZDOOM uses teleporting portals to do 5D space and DOOM 3 has portal rendering, but doesn't have teleporting portals.
BSP trees need teleportation because of how it builds the level and geometry can't overlap.
DOOM 3 portal rendering by itself can do 5D space if you change some of it and add clipping or stencils.
A good book to understand portal rendering is Mathematics for 3D Game Programming and Computer Graphics Third Edition.
Read the parts about portal systems, view frustum planes, line and plane intersection, portal clipping and reduced frustums.
Portal rendering in the DOOM 3 source code made more sense after reading the book.