XNA HDR Rendering Sample (With LogLuv Encoding)


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.



3 thoughts on “XNA HDR Rendering Sample (With LogLuv Encoding)

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

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

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