Jump to content
Sign in to follow this  
smoothchat

Brighter HDR tweak

Recommended Posts

Sorry if this has been covered before (if so please point me to it) but I have found a way to increase the brightness with HDR  enabled.

 

In the shadersHLSL/PostProcess folder is a file named ' HDR.hlsl '

 

Make a backup of this file elsewhere, then load it into notepad or similar editor.

 

At line 166 you will find '  //avgLuminance *= 0.85f; ' which is commented out by the two slashes.

 

remove the two slashes ie:  ' avgLuminance *= 0.85f; ' and save.

 

If you want to experiment with this value, increasing it makes the image darker, decreasing makes it lighter.

 

I haven't determined whether it messes with the overall HDR experience, but the programmer put this line in and it seems to work.

 

Note: In my case, just saving and running P3D worked the first time, but later runs of P3D resulted in a black (blank) screen.

 

The solution was to ensure that the associated compiled shaders in the ' C:\Users\Yourname\AppData\Local\Lockheed Martin\Prepar3D v2\Shaders ' were deleted.

 

As I understand it, the HDR code looks at the average brightness of the display and boosts it adding bloom to simulate the effects of light and dark. 

 

The stock code seems optimised for a standard display. 

 

Those of us with triple screens have much larger display area that often includes parts of the side window views. This extra brightness has the HDR overcompensating and resulting in a darker than desired screen. Changing the code at line 166 seems to tell the code that the average brightness is less, therefore add more brightness.

 

------------------

 

Another option which leaves the rest of the code alone, is to increase the return value of the ' Composite ' function.

 

Insert ' final *= 1.2f; '    just before the last line of code

 

eg:

 

    bloom = bloom * BloomMagnitude;

    // Add in the bloom
    float3 final = color + bloom + brighten + dither;
    final *= 1.2f;
    return float4( final, 1.0f );
}

 

So far I prefer the above option.  Note: setting a value too high causes bright parts to clip.

 

I welcome everyone's comments.


Specs: Win10, 4790K, nVidia 1080ti, Saitek Yoke+Quadrant+Radio/Switch and AP panels, VRInsight 737 overhead, Virtual Avionics 737 MCP. 3 x 1440*900 main display + 1024*600 VDU display. NLR V3 Motion seat. Oculus DK2 CV1 HTC Vive VR headsets.

Share this post


Link to post
Share on other sites

In the shadersHLSL/PostProcess folder is a file named ' HDR.hlsl '

 

where is this located.

spacer.png

REX AccuSeason Developer

REX Simulations

Share this post


Link to post
Share on other sites

In your main Prepar3D folder,

 

typically something like c:\program files\prepar3d\shadersHLSL\PostProcess\

 

PS.  I decided to stick with the avgLuminance *= 0.85f; option.

 

I was getting some clipping on the white clouds.


Specs: Win10, 4790K, nVidia 1080ti, Saitek Yoke+Quadrant+Radio/Switch and AP panels, VRInsight 737 overhead, Virtual Avionics 737 MCP. 3 x 1440*900 main display + 1024*600 VDU display. NLR V3 Motion seat. Oculus DK2 CV1 HTC Vive VR headsets.

Share this post


Link to post
Share on other sites
Guest

Thanks for sharing ... I don't know about others but I'm looking for is a slight reduction in the overall application of HDR ... being both lights and darks.  HDR appears to be a little too aggressive overall.

 

As I understand it the Bloom adjustment will work with just changing the light side of the equation.  The adjustments to avgLuminance is effectively tricking the HDR process into thinking their is more or less light but isn't changing the amount of HDR to apply.  Also, not sure how this may impact night visuals ... as it stands now I think night lighting with HDR is absolutely perfect.

 

What I was hoping to find (and didn't) was the overall application of HDR.

 

But appreciate your findings and information.  It'll be interesting to see what others think of these adjustments.

 

For anyone experimenting with this don't forget after each change you need to delete you shaders folder i.e. "C:\Users\Rob\AppData\Local\Lockheed Martin\Prepar3D v2\Shaders"

 

Cheers, Rob.

Share this post


Link to post
Share on other sites

here is a little clip a friend made to show the differences

personally i find it hard to put my finger on the changes; the first half to me looks better

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...