Would it be possible to place a texture into each RGB channel?

Example: Red = wood.png Blue = tiles.png Green = metal.png

The advantages I could see are saving space, memory and draw calls and the resolution might not suffer. (unless I'm missing something)

I've seen people pack many textures into one but they have to be scaled to fit which lowers resolution.


1 Answer 1


Not realistically, no.

When you pack an image into a color channel, you make one of two trade-offs:

1) The first case is when you only need a single color channel (greyscale image). This is not true is the usual case. Your wood.png likely has a mix of RGB colors (giving it the brown tint). Note that you can actually ignore color in your images in some cases by converting your images to gradient maps. However, this works along with normal maps, meaning you still need 3 channels for your image. This is commonly done for bitmap fonts and some other types of images, but not diffuse color images like you specified.

2) The second case is when you can ignore most of the texture hardware (mipmapping/filtering) and hence can use a 16-bit image and then pack your RGB data into a single channel at reduced color accuracy. The filtering hardware doesn't know how to deal with this which is why you can't use filtering if you do this. It's often done for some kinds of data-buffers (like g-buffers in deferred shading situations) but filtering is not needed in those cases.

You could use a texture array for them (assuming they are all the same dimensions and format), which would reduce your draw calls but not bandwidth or memory.

  • \$\begingroup\$ What if you only held greyscale info of each texture in the separate channels and then added the colour in engine? For instance in the Unity engine you can change the colour of textures. \$\endgroup\$
    – Althaen
    Commented Mar 25, 2014 at 0:17
  • \$\begingroup\$ @Althaen: try it. Simply mixing a color with a greyscale image is going to look awful in most cases. \$\endgroup\$ Commented Mar 25, 2014 at 4:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .