webaverse / app

Web metaverse client
https://app.webaverse.com
MIT License
344 stars 207 forks source link

Performance settings persistence #2321

Open avaer opened 2 years ago

avaer commented 2 years ago

We have an avatar auto-optimization pipeline coming online, and it can be tested in the options panel. (Ignore the UI)

image

We want to make this setting persistent, auto-detected, and applied to all avatars in the scene, for UX/performance reasons.

Requirements

  1. Make the avatar setting persistent across reloads (apply directly on load, without the unoptimized avatar ever being rendered). Can use localStorage to store the setting
  2. Make the setting apply to all avatars in the scene (all totum VRM)
  3. Bugfix corner cases, like the dioramas not rendering
  4. Support some sort of heuristic for setting the performance mode if it was not previously set, or at least don't always use the MToon HQ mode, since that is a performance killer -- one option is we default to the crunched avatar in all cases
  5. (Performance optimization) use the crunched version of the avatar for depth rendering in the post processing stack, and the diorama, to collapse draw calls into one
avaer commented 2 years ago

This seems like a good library to use for calibration:

https://github.com/pmndrs/detect-gpu https://pmndrs.github.io/detect-gpu/

It is framerate-uncapped, and the determined FPS can be used to get a ballpark figure on the spec of the machine, which is bucketed into slots.

0reo commented 2 years ago

This has been broken up into multiple tickets