This includes code to modify the getPortalRect function where if the overall width or height exceededs the bounds of the viewport, it will simply expand to the overall viewport. This should fix some glitches with room geometry which overlaps outside of its bounds like in the screenshot below, while still allowing overlapping rooms like those outside of Lara's Home to be scissor clipped correctly.
This includes code to modify the getPortalRect function where if the overall width or height exceededs the bounds of the viewport, it will simply expand to the overall viewport. This should fix some glitches with room geometry which overlaps outside of its bounds like in the screenshot below, while still allowing overlapping rooms like those outside of Lara's Home to be scissor clipped correctly.