• Advertisement
Sign in to follow this  

HDR Questions

This topic is 741 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 Guys,


1. According to what I know, to make the scene appear more detailed, bright things should appear more bright and dark things should appear more dark, right?, how can I do that? Should I set "luminanceValue" for each mesh to determine what mesh is bright and what mesh is dark as the following?

float lum = dot(color.rgb, float3(0.2125f, 0.7154f, 0.0721f));
color /= lum;
lum *= luminanceValue;
color *= lum;
return color;


2. What do you suggest to do in the scene to take advantage of HDR and make the scene appear better?


3. What is MIDDLE_GRAY in tone mapping? and what's the appropriate value that should be used?


4. Any examples of different tone mapping algorithm?


5. For tone mapping, I tried the following and it's working well:

float fAdaptedLum = Tex[1].Sample( SampleType, float2( 0.5, 0.5 )).r;
float lum = dot( color.rgb, float3( 0.2125f, 0.7154f, 0.0721f ));
lum = (lum * (1 + lum / WHITE)) / (1 + lum);
lum *= ALPHA / adaptedLum;
color *= lum;
return color;

But when I try this, the scene appear with low details:

float fAdaptedLum = Tex[1].Sample( SampleType, float2( 0.5, 0.5 )).r;
float g_fMiddleGray = 0.72f;
color.rgb *= g_fMiddleGray/(fAdaptedLum + 0.001f);
color.rgb /= (1.0f+color);
return color;

Any idea why the first one is improving the scene while the second one is giving bad results?

Edited by Medo3337

Share this post

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

  • Advertisement