-
Notifications
You must be signed in to change notification settings - Fork 822
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 Render List Generation and Frame-Independent Task Scheduling #2887
Open
douira
wants to merge
81
commits into
CaffeineMC:dev
Choose a base branch
from
douira:decoupled-frustum-test
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,758
−668
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Nov 22, 2024
douira
force-pushed
the
decoupled-frustum-test
branch
from
November 25, 2024 19:12
94885b5
to
158cd78
Compare
douira
force-pushed
the
decoupled-frustum-test
branch
from
November 27, 2024 22:35
1ad3a3f
to
f969cbb
Compare
douira
force-pushed
the
decoupled-frustum-test
branch
from
December 7, 2024 22:31
ecdd040
to
df32670
Compare
…led yet, it just does the tree frustum test right after each bfs for testing purposes atm)
…g RenderSection objects, improve tree render list generation performance
…the tree, this greatly improves performance
…ync bfs if there is very fast movement
…trees of varying accuracy to present as few sections as possible while not generating any errors when the camera is in motion.
… unloading of chunks
…ssues when the distance changes (for example under water)
- rebuild tasks are scheduled in a queue and pruned each frame - async culling tasks and results are classes in their own package - chunk rebuild tasks are prioritized based on their distance to the camera, their type, how long the task has been pending, and whether the section is currently visible (in the frustum) - generally cleaned up the update method in RSM
… not automatically correctly ordered since they're not coming from a tree � Conflicts: � common/src/main/java/net/caffeinemc/mods/sodium/client/render/chunk/lists/VisibleChunkCollectorAsync.java
…her issues with (at least vertical) sorting though and even important zero-frame blocking tasks are not scheduled within the same frame
…tum task list update
…fallback and for use in iris. Now that there's a fallback, we don't need to accept using invalid trees if there's no other trees available. fix tree isValid test for wide trees. rename the trees field on RSM since it's misleading (it's actually forests, and they're cull results)
…parate from regular deferred task scheduling
tree traversal only does correct in-region sorting, not between regions
douira
force-pushed
the
decoupled-frustum-test
branch
from
December 31, 2024 04:41
29caa4b
to
9c44397
Compare
…matrix to avoid very long tail of camera changes after player movement
…k tree and updating the section's pending tasks by storing and then later catching up the tree with the changes
…speedy scheduling of nearby section tasks
… render into one method, fix bugs with disappearing entities and not rendered newly non-empty sections by refactoring is present code in SectionTree to use a predicate that checks for section emptiness
…flag from MC to "playerChanged" for clarity, don't schedule tasks as important if they're no longer in range and schedule tasks during cull task even if they're important to make sure tasks that were downgraded in importance are still processed eventually
…sion, this improves scheduling accuracy and doesn't allow the estimator to get biased by fast tasks on small sections
…it in 1.21.2 Signed-off-by: douira <[email protected]>
…sync tasks whenever possible, only perform out of graph fallback when really out of graph Signed-off-by: douira <[email protected]>
Signed-off-by: douira <[email protected]>
Signed-off-by: douira <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uses an octree to generate render lists independently of the, now asynchronous, slow graph search.
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