Why grayscale image use 4 bytes per pixel in VRAM?

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.

https://github.com/playcanvas/engine/blob/master/src/resources/parser/texture/img.js#L40

2 Likes