hmm... it just so happens we were having a conversation about other framebuffer formats recently, specifically the R11G11B10 one you mention. From what I understood the alpha/fourth component may not even be utilized in many cases as it would normally describe the transparency/translucency/opaqueness of the object. There are other uses for the bits as other devs have described in their logluv HDR encoding, but the 2-bit alpha component seems to be a mystery to some for the A2R10G10B10 in terms of compromise. Are 8-bits for the alpha a waste in RGBA8?
The alpha channel of the back buffer (render target) is rarely used for blending. All the most common blending techniques can be implemented with only the source alpha (object's texture alpha channel). Destination alpha is only useful for some multipass rendering tricks (and most can be implemented more efficiently with the stencil buffer).
For custom color representations (logluv, RGBE8, etc), the alpha channel is used to store the color data component (exponent, color multiplier or fourth color channel needed for the color space). When writing custom color representations to the back buffer, the alpha channel is directly written to just like the RGB channels, and no alpha blending is used. This also means that source alpha cannot be used either (as the pixel shader alpha output is used for the alpha write and contains color data instead of alpha). When you are rendering with a custom color space, the only way to get alpha channel blending to work is to pinpoint between 2 buffers (sampling the pixel color from the other and rendering to the other). This slows down the performance considerably (game has to copy the whole backbuffer to a texture for every alpha blended object).
How much extra range results from the extra bits associated with the R and G channels then? FP10 has been described more as a medium dynamic range format.
Each channel has 5 exponent bits and 6-6-5 mantissa bits. The maximum range is the same as with 16 bit floats (same number of exponent bits). The precision is however not as good (10 bits of mantissa vs 5/6 bits), and 11/10 bits floats store only positive values.
16bit float:
- 5 bit exponent
- 10 bit mantissa
- 1 bit sign
- Highest value: 2^(31-15) = 65536 (both positive and negative)
11bit float:
- 5 bit exponent
- 6 bit mantissa
- no sign bits
- Highest value: 2^(31-15) = 65536 (only positive)
It also makes me wonder if we'll see a similarly re-appropriation of the FP16 bits ala FP10 etc. in future hardware if devs don't need that separate 4th channel so much, and at the same time get ridiculously high dynamic range (of course assuming hardware doesn't shift to logluv encoding where it's all different). Then again, FP16 is already a huge enough dynamic range... what other uses would there be to go beyond R16G16B16... without being a waste, what can the 16 bits of the 4th channel be used towards (same question as earlier)
R9G9B9E5 (9 bits mantissa per channel, 5 bits shared exponent) is also a good format for HDR rendering. But so far no hardware supports it as a render target (only as a texture).
R9G9B9E5 float:
- 5 bit exponent (shared with all channels)
- 9 bit mantissa per channel
- no sign bits
- Highest value: 2^(31-15) = 65536 (only positive)
This is a very good 4 byte (32 bit) format for HDR rendering, as the quality is almost equal to FP16 (only one less mantissa bits), and there is no unnecessary sign bits either. The shared exponent is not a problem. If a channel is considerably brighter than the others, the reduction of other channels precision cannot be seen by human eye (the intense blooming of a super bright pixel color channel dominates the pixel color).