bevy_ecs_tilemap icon indicating copy to clipboard operation
bevy_ecs_tilemap copied to clipboard

WASM Support for texture arrays

Open aleokdev opened this issue 2 years ago • 6 comments

The crate doesn't seem to work with WASM, as it doesn't render anything. Tried the LDTK example and got this: Screenshot_20220923_230924

aleokdev avatar Sep 23 '22 21:09 aleokdev

You need to use the atlas feature on WASM. There is a wgpu bug with array textures.

StarArawn avatar Sep 23 '22 21:09 StarArawn

Works perfectly, thanks!

aleokdev avatar Sep 24 '22 08:09 aleokdev

@StarArawn Can you link to the relevant WGPU issue here? With that, we can close this issue, I think.

bzm3r avatar Sep 25 '22 15:09 bzm3r

@StarArawn Can you link to the relevant WGPU issue here? With that, we can close this issue, I think.

No issue that I know of. I can probably create one though. I need to collect more info though.

StarArawn avatar Sep 28 '22 02:09 StarArawn

Are there any downsides/overhead to the atlas feature, or is it safe to just activate on all target archs?

musjj avatar Jul 28 '24 16:07 musjj

Are there any downsides/overhead to the atlas feature, or is it safe to just activate on all target archs?

There are more rendering artifacts because atlases inherently bleed neighboring pixels. Texture arrays are generally better and are supported by webGPU if that is your target.

StarArawn avatar Jul 28 '24 20:07 StarArawn