Sign in to follow this  

HDR Help

This topic is 3630 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Im want to implement HDR lighning in my engine code and it would be really helpfull with a tutorial on the subject preferably for dx10. I also wonder if there is any free tool for making and modifying HDR textures. :) Stefan

Share this post


Link to post
Share on other sites
I'm not really aware of very many D3D10 tutorials period, since the API is still relatively new at this point. Humus has a few, but nothing related to HDR. Perhaps someone else knows of some more?

As for HDR specifically, the D3D9 samples in the SDK (particularly Jack Hoxley's sample) are as informative and useful as they ever were. The basic premise used is this:

-Render the entire scene to a floating-point buffer, usually RGBA16F
-Convert the HDR values in the floating-point buffer to luminance (grayscale) values
-Repeatedly downsample the luminance buffer until it is 1x1 in size
-In a final full-screen pass, use the luminance value to tone-map the HDR pixel values to the range of 0-1

However you should be aware that there are quite a few ways to handle this, as you will surely find out if you look through some of the threads here on HDR and tone-mapping. For example the HDR values don't have to be stored in a floating-point buffer, they can be encoded in a regular RGBA8 buffer (lookup NAO32, used in the PS3 game Heavenly Sword). It is also common to perform some "adaptation" on the luminance value before the final tone-mapping pass, which is used to simulate how an eye or camera gradually adapts to extreme brightness or darkness (the "HDRLighting" sample in the SDK does this). There's also a few tone-mapping operators in popular use, which is used in the final step to make an HDR pixel into an LDR pixel. In an even more extreme case, we have Valve who implemented HDR by performing the tone-mapping directly in the pixel shader when rendering objects, rather than as a post-process. You'll probably have a better understanding of the full-implications of their approach once you actually start working with HDR yourself. Either way, the point I'm trying to make is that there's more than one way to skin this cat and you should keep that in mind when searching the Internet for guidance on this particular topic.

Share this post


Link to post
Share on other sites
Quote:
Original post by MJP
I'm not really aware of very many D3D10 tutorials period, since the API is still relatively new at this point. Humus has a few, but nothing related to HDR. Perhaps someone else knows of some more?


I don't know if you can count these as tutorials, but there's a D3D10 HDR sample in NVIDIA's SDK 10. I think there also might be a D3D10 one in the DirectX SDK samples.

Share this post


Link to post
Share on other sites

This topic is 3630 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this