-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
type/featA new featureA new featuretype/perfA code change that improves performanceA code change that improves performance
Description
Best practice for WebGL2 is texStorage + texSubImage.
texStorage has some limitations:
- size and format cannot be changed after first call
- but it is more performant to store/update
texImage (current):
- easy to work with because it handles memory allocation and data upload in one call
We currently use texImage but texStorage for texture 2D Array.
We could either:
- creation: texImage + update: check for width/height/format/type change to either texImage or if no change texSubImage
- creation: texStorage + update: same state diff and choose texStorage/texSubImage
- creation: texImage + update: same state diff + choose texStorage/texSubImage storage as an texture option ctx.texture2D({ ...bla, storage: true }) (like WebGPU usage maybe?)
Related:
- our pex-renderer post-pro pipeline recycle textures
Metadata
Metadata
Assignees
Labels
type/featA new featureA new featuretype/perfA code change that improves performanceA code change that improves performance