I noticed something in the Standard shader that surprised me. The Metallic Map uses the R channel for metalness, A for gloss/smoothness, and G and B channels are ignored.
But both Height and Occlusion both use the G channel only, and ignore RBA.
Would it make sense to change one of those to B so that a map can be packed as such:
R: Metalness
G: Occlusion
B: Height
A: Smoothness
It seems that having both Occlusion and Height on G is a bit of a waste because it requires them to be individual textures.
If there something I am missing as to why both are on G, or was one supposed to B from the get go?
Replies
If you need two channels of data, and want the least compression errors, the you can use BC3 compression (DXT5). With BC3, the alpha channel has the most precision, followed by the green channel. So you would store your two grayscale maps in those two channels, and blank out Red and Blue (so it compresses with less errors).
Kind of strange to me they use Red instead of Green though. Maybe this is because it's simply the first channel. Come to think of it, the incoming channel doesn't matter, because you're probably using a PSD or a TGA or whatever, and they probably swizzle the Red into the Green channel when they make the DXT file. You don't make the DXT, they do automatically (see the bitmap settings in Unity).
Swizzle means channel packing
http://wiki.polycount.com/wiki/ChannelPacking
The compression info
http://wiki.polycount.com/wiki/Normal_Map_Compression