#RAM Usage Sprite Sheets

16 messages · Page 1 of 1 (latest)

dapper fiber
#

I'm trying to figure out why sprite sheets that weigh ~ 500 kb are taking up almost 240 MB of Video RAM each. I am loading them using load when my game starts. Any help would be greatly appreciated.

radiant crane
#

Textures are uncompressed in VRAM, and those are very large textures

dapper fiber
#
width x height x bytes per pixel
= 3840 x 16320 x 4
= 251,658,240 bytes
= 240 MB (approximately)

According to GPT

dapper fiber
radiant crane
#

Which is why they compress so well

dapper fiber
#

Ok I think I see where the earlier problem was

radiant crane
#

You might want to try to reduce the size of these. If they're 98% transparent, then it seems like there's room for improvement there?

dapper fiber
#

About 238.5* MB in fact haha

#

So I guess no sprite sheets ?

dapper fiber
#

And causing "lag spikes"

radiant crane
#

probably

dapper fiber
#

And there's no way to load them compressed into VRAM without garbaging the image IIUC?

#

Problem solved it seems 😑

dapper fiber
#

@radiant crane Can you use an offsetted sprite sheet (where every frame has its own offset), load the offsets to an array and have Godot change the offset during runtime ?