You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for textures e.g. albedo maps, height maps, normal maps, etc. would be desirable for the MVP.
Important note: WebGPU does not support bindless textures. This means that drawing textured objects in one pass becomes non-trivial. Possible workarounds:
Use generative WGSL code to have multiple bindings, one for each texture. Need to investigate the limit of bindings in a group and the performance.
Texture atlas: pack textures inside a large texture for lookup at runtime.
Use texture_2d_array, but all textures must be the same size.
Texture atlas
The best out of all seems to be using a texture atlas, as it is a common software solution, a well-researched problem, and allows (conceptually) an arbitrary number of textures with arbitrary sizes.
The problem of generating a texture atlas is that of 2D rectangular bin packing. However, we would like to consider the dynamic version of it whenever possible, where a texture might be added or destroyed on the fly, and the texture atlas must react correspondingly. This variant of the problem is 2D rectangular bin packing with predefined gaps, or dynamic bin packing (?).
Support for textures e.g. albedo maps, height maps, normal maps, etc. would be desirable for the MVP.
Important note: WebGPU does not support bindless textures. This means that drawing textured objects in one pass becomes non-trivial. Possible workarounds:
texture_2d_array
, but all textures must be the same size.Texture atlas
The best out of all seems to be using a texture atlas, as it is a common software solution, a well-researched problem, and allows (conceptually) an arbitrary number of textures with arbitrary sizes.
The problem of generating a texture atlas is that of 2D rectangular bin packing. However, we would like to consider the dynamic version of it whenever possible, where a texture might be added or destroyed on the fly, and the texture atlas must react correspondingly. This variant of the problem is 2D rectangular bin packing with predefined gaps, or dynamic bin packing (?).
Helpful resources
texture_2d_array
: https://devcodef1.com/news/1193380/webgpu-textureview-and-2d-texture-arrayThe text was updated successfully, but these errors were encountered: