I want to reduce the color depth of an image to save RAM resources during runtime: for example to increase the quality of the spritesheet or the number of frames of an animation in the spritesheet.
So to save memory I am reducing the color depth using Paint.
When I import the bmp file for example, the result is same as the png file, a value of 8 color depth…
Even monocrome (black & white) file is the same size as the png file (shown in the profiler),
Take a look, I’ve made the file public:
October 30, 2021, 3:56pm
That’s correct. When the image is loaded as a texture, it is stored uncompressed in VRAM.
If you want to save on VRAM, either use Basis to hardware compress the textures or the legacy compression as I think you are using much older devices which may be better
Thank you. I noticed a significant reduction in VRAM.
It would be nice to know what’s going on behind the sceens. Do you have documentation of what you guys are doing to reduce the VRAM?
I’m just curious why a simple black & whiite image as shown in my project is not using just 1 bit per pixel. Theoretically it should be less than 699 KB.
October 31, 2021, 7:42am
This article should help explain hardware texture compression better
Basis Texture Compression arrives in PlayCanvas | PlayCanvas
For the GPU, it doesn’t matter about the format of the image, it either has to be stored completely uncompressed (like what a bitmap is to PNG) or in a format that is supported by the GPU (which is what we do with the hardware texture compression)
Ah ic, interesting information. I appreciate it.