XNA HDR Rendering Sample (With LogLuv Encoding)

hdrsample1

A sample I whipped up for XNA info, based on code I developed for my own project.  Walks through the basics of setting up an HDR pipeline (rendering, luminance calculation, bloom, exposure adjustement, tone mapping).  Also demonstrates how to use LogLuv encoding so that fp16 surfaces don’t have to be used, which makes the implementation practical for the Xbox 360.

http://www.xnainfo.com/content.php?content=28

3 Responses to “XNA HDR Rendering Sample (With LogLuv Encoding)”

  1. A Closer Look At Tone Mapping « The Danger Zone Says:

    [...] XNA HDR Rendering Sample (With LogLuv Encoding) [...]

  2. Phil Fortier Says:

    Is the last line in the ToneMap function incorrect?
    e.g.
    return fLumCompressed * vColor;
    should really be:
    return fLumCompressed * vColor / fLumPixel;

    This corresponds to what I’ve seen in papers on HDR, and looks correct.

  3. MJP Says:

    Yes what you have there is correct, it should be divided by the pixel luminance.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 34 other followers