Every texture in my game has a bit depth of 8, meaning there are at most 256 unique colours in each texture.
This means I could store the index of each pixel’s colour in the texture, rather than the entire RGB value for each pixel (i.e. change the texture format from RGB8
to R8
). This index could then be used to select the actual colour from a lookup table, which would be stored in a uniform array, SSBO, 1D texture, etc.
The downsides are that texture filtering would break (can’t interpolate between colour indices), and using the result of one texture lookup to read from another texture is slow.
I found EXT_paletted_texture
, but support for it has been dropped. Are there any modern solutions to this? Reducing texture VRAM by 66% would be great.