-
Notifications
You must be signed in to change notification settings - Fork 18
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
Avatar performance is worse when using the optimizer #92
Comments
Thats expected. Merging meshes with shader toggles adds extra code to the shader and you always do skinning & some vertex shader code for all vertices even on disabled stuff. If you send the generated assets as described here I can take a look if it generated some truly outrageous stuff or if its just the expected overhead of shader toggles. |
Thank you for your response. Here are the assets. |
@MivaNyan You need to remove materials by atlasing them in one skinned mesh. For example, you have four materials on your clothes. You need to make a material atlas of all four into one using Blender or another optimizer program that makes an atlas of materials. |
The basic preset. It doesn't change the shaders and still allows for some mesh merging as well as merging of material slots that use the same material. The better GPU performance you observed in the second to last test is likely due to the merge same ratio blendshapes if I were to guess. There isn't really much for my optimizer to do GPU wise for shaders that already have their own lock in like poi. For shaders that don't have a lock in however |
ok i had a look at some of the shaders it generated. seems fine except for poi fur. poi locking does one crucial optimization that mine doesnt. please try again with optimizer set to shader toggles while keeping the fur materials locked in instead of unlocked. im curious how much of the performance difference is due to that. |
Here's the result with "Shader toggles" preset and fur material locked: @Toys0125 thanks for your recommendation, I'm already atlasing some materials! |
I've investigated this a bit more and found that some of my code generation does harm poi fur performance considerably. |
Noticed this issue a while ago, I thought it might've been a random bug in an older version. The issue has persisted no matter the versions,
I only use poiyomi shader and face tracking on my avatar. Everything including the optimizer is of the latest version. Write defaults - On.
The avatar in this example was the worst offender. On other avatars sometimes frame time is only slightly worse, sometimes it's better, but in most cases with either "Full" preset or "Shader Toggles" preset enabled, frame time is worse compared to using no optimizer at all.
Tested performance in an empty world, only 1 full mirror enabled, the closer to the mirror - the worse frame time gets. Worst case frame time is reflected on the screenshots below.
Full preset:
With "Merge Different Property Materials" Disabled:
With "Merge Skinned Meshes" Disabled:
With "Merge Different Property Materials", "Merge Skinned Meshes" and "Write Properties as Static Values" Disabled:
And Finally, without using the optimizer at all:
The text was updated successfully, but these errors were encountered: