Skip to content

Conversation

@VReaperV
Copy link
Contributor

Save portal AABBs when loading the map, then use them to cull portals instead of using the vertex buffer. I've considered using a rect instead since portals only really work on flat surfaces, but it wasn't important enough for me to bother given that the surface can be rotated. It might also be worth just using R_CullBox() instead of the projection into window coordinates and clipping.

Also fixes the issue mentioned in a comment that said that portal distance should be between the portal surface and view origin, instead of between the closest vertex and view origin.

This also improves performance since the vertex buffer is no longer read from on the CPU.

Fixes #1216 and #1199.

@VReaperV VReaperV linked an issue Nov 18, 2024 that may be closed by this pull request
Save portal AABBs when loading the map, then use them to cull portals instead of using the vertex buffer.
Copy link
Member

@illwieckz illwieckz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@VReaperV VReaperV merged commit b555c7f into DaemonEngine:master Nov 23, 2024
8 checks passed
@VReaperV VReaperV deleted the fix-portal-smp branch November 23, 2024 20:13
@slipher slipher mentioned this pull request Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

r_smp is broken with portals Reading from tess.verts

2 participants