#TextureAtlas usage

10 messages · Page 1 of 1 (latest)

smoky gulch
#

In my previous non-Bevy OpenGL projects, I always extensively use texture atlases for almost everything to increase performance (since the glDraw* methods are relatively really slow). But when I look into Bevy codes, most of the codes and external crates directly use Image, and even when they use TextureAtlas-es, it's really minimal (benimator for example, uses a single TextureAtlas for individual animations).

What's the reason behind this? Won't it be much more performant if more sprite renderings are batched? And does the performance cost really matter in Bevy (or wgpu, I guess)?

ocean sundial
#

This is likely just the result of prioritizing ergonomics and ease of implementation over performance

#

A lot of these are early crates and jam games

smoky gulch
#

Well, ... i guess. would the performance matter on most devices though?

ocean sundial
#

Depends what else your game is doing! And which devices

#

On mobile, it might

smoky gulch
#

ah, okay

smoky gulch
#

actually, wait, the sprite.wgsl file doesn't use texture arrays (aww) so it can only render 1 image at a time

#

meaning each Sprite components aren't batched, presumably