Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous Graph Culling and Frame-Independent Task Scheduling #2887

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

douira
Copy link
Collaborator

@douira douira commented Nov 22, 2024

Uses an octree to generate render lists independently of the, now asynchronous, slow graph search.

  • It runs the occlusion culler in a separate thread, which allows a large speedup in render list generation time. Correct culling results are ensured with a combination of different types of BFS, synchronous occlusion culling is used as a last resort if the camera teleports or moves extremely quickly.
  • Tasks are ordered based on a combination score of how long they've been pending, their distance from the camera, their type, and whether they're visible in the camera frustum. How many tasks can be scheduled is now independent of the frame rate and instead are limited based on their estimated duration and size.
  • There's an upload limit to ensure not too many tasks are submitted that will exceed the upload buffer's size. This isn't a hard limit and this PR doesn't implement a new way of handling task buffers, to avoid expanding the scope too far.

Testing has not shown regressions and generally frame rate has improved a little if a system was not limited by render list generation, and a lot if it was. (see testing thread)

Companion PR in Iris: IrisShaders/Iris#2539

@douira douira force-pushed the decoupled-frustum-test branch from 94885b5 to 158cd78 Compare November 25, 2024 19:12
@douira douira added the T-enhancement Type: Enhancement label Nov 26, 2024
@douira douira force-pushed the decoupled-frustum-test branch from 1ad3a3f to f969cbb Compare November 27, 2024 22:35
@jellysquid3 jellysquid3 added this to the Sodium 0.7 milestone Dec 2, 2024
@douira douira force-pushed the decoupled-frustum-test branch from ecdd040 to df32670 Compare December 7, 2024 22:31
@douira douira force-pushed the decoupled-frustum-test branch from 29caa4b to 9c44397 Compare December 31, 2024 04:41
@douira douira force-pushed the decoupled-frustum-test branch 2 times, most recently from 3f21cde to 99bd356 Compare January 19, 2025 16:06
@douira douira force-pushed the decoupled-frustum-test branch 4 times, most recently from 0c8a3d9 to d4269aa Compare February 18, 2025 19:25
@douira douira changed the title Asynchronous Render List Generation and Frame-Independent Task Scheduling Asynchronous Graph Culling and Frame-Independent Task Scheduling Feb 20, 2025
@douira douira force-pushed the decoupled-frustum-test branch from a36c63a to 7721195 Compare February 21, 2025 20:04
…eration.

Squash commit of the history of the decoupled-frustum-test branch's history because it was accumulating too much cruft from repeated rebases, and they were taking too long to work through.
also refactored the data removal methods into one because they have significant overlap, and they can also share the same clear call if both types of data are being removed at the same time
… bug where sort tasks upgraded to rebuild tasks would not update the index data if the translucent geometry didn't otherwise require an upload of the index data
@douira douira force-pushed the decoupled-frustum-test branch from 7721195 to 927caf6 Compare February 22, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-enhancement Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants