SurfaceFormat.HdrBlendable

SurfaceFormat.HdrBlendable

  • Comments 9

If you ever tried to implement high dynamic range (HDR) rendering,  you probably noticed a few things:

  • HDR requires a rendertarget format with more than 8 bit precision
  • If you want to draw anything interesting, this format needs to support alpha blending
  • There is no consistently available format that meets these requirements :-(

XNA Game Studio 4.0 introduces a new SurfaceFormat.HdrBlendable with the following characteristics:

  • Guaranteed to be supported for textures and rendertargets (but not the backbuffer) by all HiDef devices
  • Supports alpha blending
  • Floating point format with platform specific precision
    • RGB
      • At least 7 bits mantissa
      • At least 3 bits exponent
      • Range at least 0 to 31.875
      • Smallest nonzero value <= (1 / 512)
      • May or may not support NaN, Inf + denorms
    • Alpha
      • At least 2 bits
      • Range at least 0 to 1
  • When used with GetData or SetData, pixel values are encoded as HalfVector4
  • Only supports point sampling (no filtering)

On Xbox, this is implemented using an Xbox specific 7e3 (32 bits per pixel) EDRAM format. On Windows, it is implemented using HalfVector4.

  • *clap**clap**clap**clap*

  • The more I read about XNA 4.0, to more excited I get about its release. Can't wait!

  • Will the alpha blending on xbox be quantized to 4 levels of output, or done at high precision?

    When alpha blending into 1010102 int, there are only two intermediate levels of blend...

  • > When alpha blending into 1010102 int, there are only two intermediate levels of blend...

    Not in GS4...

    :-)

  • Yay! Finally we get FP10!

  • >> When alpha blending into 1010102 int, there are only two intermediate levels of blend...

    > Not in GS4...

    > :-)

    Very cool :)

  • Shawn what about the phone , is there similar surface in the future

    Michael

  • > what about the phone , is there similar surface in the future

    HdrBlendable (and in fact all floating point formats) are a HiDef feature, not supported in Reach.

  • Thanks, Shawn! I'll copy this over to the SurfaceFormat documentation page, which is all "this is a thing used for a thing", which is great if you don't know what HDR stands for but that's about it. I dream of a day when MSDN can be used as the primary source for information about what something does. :P

Page 1 of 1 (9 items)
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post