Why grayscale image use 4 bytes per pixel in VRAM?

I create a 1024x1024 AO Map, i think it use 1k1k1byte(=1M) in VRAM, but it use more then 4MB in VRAM.

Hi @yusjoel and welcome,

All images uploaded to the GPU contain all color channels (RGBA), regardless if they are only using a single one.

I think that’s the case of how the GPU/WebGL functions with the supported texture formats.

That’s not quite true actually. When the engine loads a JPG, you get an R8_G8_B8 texture. Else (almost certainly a PNG although I think GIFs are supported too) you get an R8_G8_B8_A8 texture.