Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm looking to use a texture to store single bits (or a low number of bits, two or three). This in of itself isn't hard if you're using nearest neighbor sampling with some bit plane unpacking. The kicker here is I need the values to abide to bilinear interpolation (or something that looks like interpolation), and manually emulating bilinear interpolation is rather slow and potentially prone to problems due to hardware differences.

This is an instance where I'm going to have a lot of similarly-sized textures. The best thing I've come up with is using a 4 x 4-bit channel texture and storing a texture in each channel. This isn't exactly great for texture cache, but it's near native-hardware supported. Unfortunately, this also requires four times the space (4 bits instead of 1 bit per texel) assuming the number of textures I have to store is divisible by 4.

Is there a better way to store 1 bit per texel? Or even 2 bits per texel?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.