-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Optimize process on culled objects.
Previously the process does in the render for culled objects was too slow due to some reasons: - The matrix was updated for culled objects. - All the mesh user infos was updated for culled objects. To solve all of this issues the culled boolean is removed in RAS_MeshUser which assume that ActivateMeshSlots always add the mesh slots in the display array bucket. By doing this we can move the culled check in KX_GameObject::UpdateBuckets and avoid update all mesh user too. Also the value checked to update in UpdateBuckets are reordered: !m_bCulled && m_bVisible && m_meshUser The UPBGE was slower than the BF BGE for culled objects. For example in a scene of 10000 objects culled: UPBGE: 2.32ms BF BGE: 1.60ms With this patch the istuation is reverted: UPBGE: 0.51ms BF BGE: 1.60ms 32% faster.
- Loading branch information
1 parent
7e32845
commit 96517f7
Showing
3 changed files
with
7 additions
and
24 deletions.
There are no files selected for viewing
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 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 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
96517f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool 👍
I confirm a slight performance increase in some of my test files :)