Jump to content
  • Advertisement
Sign in to follow this  
josiah7

HDR Lighting with HLSl shader

This topic is 3655 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

Anyone familiar me with creating a hdr environment lighting shader? Basically, I just want to light an object with a HDRI in the environment. No other scene lights.I cant seem to find any simple examples of this to learn from. Currently I am using the normal maps normal in world space to look up into (index) a HDR cubemap. Now, do I need to tonemap the result before multipling it with the lit objects diffuse color? It would seem that I have to? Thanks for any help with this!

Share this post


Link to post
Share on other sites
Advertisement
There are examples for this in the DirectX SDK. Just check out the examples with HDR in the name.

Share this post


Link to post
Share on other sites
No you would perform the lighting first, and then do your average luminance calculation and tone-mapping afterwards as a post-process.

Share this post


Link to post
Share on other sites
Aha, I see, I think. So even though I have a 128 bit hdri as a cube map to
illuminate 24bit tga textures, it dosent matter. I should use object lighting
shaders no differently. Just rendering the scene to a FP rendertarget and
postprocessing it by calculating luminance for tonemapping is basically all
there is to it?

Share this post


Link to post
Share on other sites
Yes that is the standard, straightforward way of doing it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!