Open axeljaeger opened 1 year ago
This issue has been automatically staled because it has been inactive for more than 14 days. Please update to "unstale".
FYI, this is what i've done in this demo. The only missing part is the same support for WebGPU. Note: the playground is break since V7.0, but this is only declarativ, the code is still valid and used into other demo such this mapping one.
We only accept feature requests that are discussed on the BabylonJS forum
Is your feature request related to a problem? Please describe. WebGL supports TextureArrays. This is an indexable array of textures, widely used as a replacement for a texture atlas. In contrast to using one texture and use parts of it by using UV-coordinates, texture arrays allow:
Babylon JS added support for texture arrays using the RawTextureArray2D class. However, it only accepts a raw buffer to populate the content. This makes it hard to use for day to day usecases such as loading a texture array from an image file or using a canvas to prepare 2D content.
Describe the solution you'd like A simple way of populating a texture array from both a loaded Image and a canvas. In my current application, I have both usecases.
Discussion https://forum.babylonjs.com/t/populate-2d-texture-array-from-image-asset/35140/1