[DRAFT, DO-NOT-MERGE] Instancing for skeletal meshes#281
Draft
[DRAFT, DO-NOT-MERGE] Instancing for skeletal meshes#281
Conversation
0944e05 to
92f6748
Compare
716e76e to
cbf336e
Compare
…bs and made it extensible, "automatic" reset of seen-vobs after BSP traversal
…way, which MAY help with lower end GPUs on high end CPUs
…e some values for less constant buffer uploads
batching: fix rendering because of broken view matrix, shortcut for single instance clean up some residue fix node batches fluctuating, simplify unordered_map usage use meshlib to identify duplicate meshes, aswell as zCProgMeshProto->progId which should be unique-enough clean up hashing, also use progid for skeletal meshes like wolfs and npcs make skeletal batch key texture aware. use hash_combine ensure we call UpdateMeshLibTexAniState before accessing GetAniTexture(), use std::string_view for hashing add memory locations for G1 and G2, ensure updated mm->GetTexAniState()->UpdateTexList(); for batched attachments disable skeletal mesh batching for g1 sequel builds ensure all cascadeCRs are populated ahead of time work on top of motion vectors fix ide warning due to static friend rebase on per-object-velocity, fix indoor vobs being drawn when outdoors, don't rely as much on global WorldTransform fix merge conflicts, batch more meshes when rendering shadows, as we mostly dont need textures do some performance profiling, reduce need to cull against frustum, beginnings of trying to implement a renderqueue add todo things
…vob-kind, share index and vertex buffers for skeletal meshes globally
97133a5 to
5670dc0
Compare
This file contains hidden or 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
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.
This PR tries to implement instanced rendering for skeletal mesh vobs by batching them by mesh and texture.
also upload all bone transforms for each batch only a single time.
In current tests this PR can achieve up to 10-20% better performance, by issuing a lot less draw calls.
Gothic 2 Marketplace area goes from 100 to roundabout 127 FPS.
This is mostly achieved by drastically reducing the amount of setup and drawcalls needed to draw MOBs.
Though also NPCs are batched, which improves performance especially in cases where a lot of monsters of the same kind are shown.