
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.
April 30, 2010 at 12:47 AM
[...] XNA HDR Rendering Sample (With LogLuv Encoding) [...]
April 19, 2011 at 11:59 PM
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.
April 20, 2011 at 12:32 AM
Yes what you have there is correct, it should be divided by the pixel luminance.