Skip to content
This repository has been archived by the owner on Aug 22, 2020. It is now read-only.

Texture unit stalling and performance improvements #42

Open
StarArawn opened this issue May 17, 2020 · 1 comment
Open

Texture unit stalling and performance improvements #42

StarArawn opened this issue May 17, 2020 · 1 comment

Comments

@StarArawn
Copy link
Owner

Currently on lower end hardware it's possible to stall the texture units in metal, and probably other api's, which causes very poor performance. We're also using up too much texture bandwidth as well. This can be addressed in a couple of different ways.

  1. Generate mip-maps which gives us a free performance upgrade at runtime, and better quality visuals.
  2. Allow users to set the max "texture" quality/resolution.
  3. Use compressed textures(not available in wgpu yet..), but perhaps we can access it from gfx-hal via an wgpu native extension. Would require changes to gfx-hal, and wgpu.

For the first two options the best soultion is some sort of asset/texture pre-processing. Although generating mip-maps during load isn't exactly slow it's not something we really want to be doing. Instead we can generate them ahead of runtime and save them to disk. When loading the textures into harmony we can load the mipmaps backwards up to the max texture resolution specified in the quality settings.

@StarArawn
Copy link
Owner Author

Unity has a great table of supported texture compression formats on platforms/api's here:
https://docs.unity3d.com/Manual/class-TextureImporterOverride.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant