Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Haze intensity fix for P3Dv5.3 HF2 (non-EA)

Featured Replies

I modded the shaders in P3Dv5.3 HF2 to lower the haze density/Rayleigh scattering, as it's far too dense.  This is only for folks running with EA off--it won't have any effect if you are using EA.

First make a backup copy of, and then open this file with a text editor:  <your root P3Dv5 folder>\ShadersHLSL\FuncLibrary.fxh

In the vicinity of line 504, find and replace this text:

#if !defined(SHD_ENHANCED_ATMOSPHERICS_BLEND) && !defined(SHD_TO_FAR_CLIP) && !defined(SHD_SKY_STARS)
    const float distanceFogTrans = min(transmittance, CalculateExponentialFogBlend(distanceSq, cb_View.mFogDensity));
    fogInscatter += cb_View.mFogColor.rgb * distanceFogTrans;
    transmittance = saturate(transmittance - distanceFogTrans);
#endif
    return float4(fogInscatter, transmittance);


with this text

#if !defined(SHD_ENHANCED_ATMOSPHERICS_BLEND) && !defined(SHD_TO_FAR_CLIP)
    const float haze_scalar = 0.8f;  //recommend values of 0.65 to 0.85
    const float distanceFogTrans = min(transmittance, CalculateExponentialFogBlend(distanceSq, (cb_View.mFogDensity * haze_scalar)));
    fogInscatter += cb_View.mFogColor.rgb * distanceFogTrans;
    transmittance = saturate(transmittance - distanceFogTrans);
#endif
    return float4(fogInscatter, transmittance);

 

A higher value of haze_scalar makes the haze thicker, a lower value fades it.  I've settled on 0.8 here.

Once you've made the changes, you'll need to clear your shader cache before running P3D in order to effect the change.

 

Bob Scott | President and CEO, AVSIM Inc
ATP Gulfstream II-III-IV-V

Sys1 (MSFS20+24/XPlane12+11): AMD 9800X3D, water 2x240mm, MSI MPG X670E Carbon, 64GB GSkill 6000/30, nVidia RTX4090FE
Alienware AW3821DW 38" 21:9 GSync, 2x4TB Crucial T705 PCIe5 + 2x2TB Samsung 990 SSD, EVGA 1000P2 PSU, 12.9" iPad Pro
Thrustmaster TCA Boeing Yoke, TCA Airbus Sidestick, Twin TCA Airbus Throttle quads, PFC Cirrus Pedals, Coolermaster HAF932 case

Sys2 (P3Dv5/v4): i9-13900KS, water 2x360mm, ASUS Z790 Hero, 32GB GSkill 7800MHz CAS36, ASUS RTX4090
Samsung 55" JS8500 4K TV@60Hz,
3x 2TB WD SN850X 1x 4TB Crucial P3 M.2 NVME SSD, EVGA 1600T2 PSU
Fiber link to Yamaha RX-V467 Home Theater Receiver, Polk/Klipsch 6" bookshelf speakers, Polk 12" subwoofer, 12.9" iPad Pro
PFC yoke/throttle quad/pedals with custom Hall sensor retrofit, Thermaltake View 71 case, Stream Deck XL button box

Sys3 (DCS/P3Dv4/ATS/ETS): AMD 7800X3D, MSI MPG X870E Carbon, Noctua NH-D15S, 64GB GSkill 6000/30, EVGA RTX3090
Alienware AW3420DW 34" 21:9 GSync, Corsair HX1000i PSU, 4TB Crucial T705 PCIe5 + 2TB Samsung 970Evo Plus,
TM TCA Officer Pack
, Saitek combat pedals, TM Warthog, TM RS300 FF wheel/pedals, Coolermaster HAF XB case

  • Moderator

Bob, you're a star man! 👏 Having made the mod I no longer have than annoying banding when at altitude.

Thanks very much for identifying the problem and coming up with the fix. It makes you wonder why LM never came up with a fix given a lot of people must not use EA.

Ray (Cheshire, England).

System: P3D v5.3HF2, Intel i9-13900K, MSI 4090 GAMING X TRIO 24G, Crucial T700 4Tb M.2 SSD, Asus ROG Maximus Z790 Hero, 32Gb Corsair Vengeance DDR5 6000Mhz RAM, Win 11 Pro 64-bit, BenQ PD3200U 32” UHD monitor, Fulcrum One yoke, Fulcrum Throttle Quadrant.

Cheadle Hulme Weather website.

chlive.php

I tried this edit, and I'm pretty pleased with it.  It really does make the cloud renditions so much better if you're using the sim without EA.  Sometimes I do change to a non-EA environment because the cockpits are brighter and the world is a bit brighter too.

Stan

  • Commercial Member

I’d be curious to have an EA equivalent.  Banding on the horizon is pretty noticeable with ActiveSky for me forever.

Kyle Weber (Private Pilot, ASEL; Flight Test Engineer)
Check out my repaints and downloads, all right here on AVSIM

Do you have the legacy clouds enabled or the volumetric clouds enabled.

 

Saw a tutorial about the EA on/off results with/without legacy/volumetric clouds.

https://www.youtube.com/watch?v=Sp_Nc2zkNro

 

I'd like to see a before/after screen shot of the modded EA off to see difference in the haze effect.

 

Edited by Butch1

On 12/24/2022 at 3:33 PM, Butch1 said:

I tried this suggestion and it does make a difference with EA off. I didn't know how to clear the shaders folder but rather ask (bother) anyone here I googled it (google is sometimes your friend) Poppet explains where the shaders folder is and how to clear them.

 https://www.avsim.com/forums/topic/479630-where-to-find-my-shaders-folder-prepar3d-v2-v3-v4/

Also shown in Youtube:

https://www.youtube.com/watch?v=xJo5gWCw3is&t=1s

 

 

On 12/24/2022 at 3:33 PM, Butch1 said:

 

 

 

Edited by Butch1

Does this work with Envshade or RDShade?

Gigabyte x670 Aorus Elite AX MB; AMD 7800X3D CPU; Deepcool LT520 AIO Cooler; 64 Gb G.Skill Trident Z5 NEO DDR5 6000; Win11 Pro; P3D V5.4; 1 Samsung 990 2Tb NVMe SSD: 1 Crucial 4Tb MX500 SATA SSD; 1 Samsung 860 1Tb SSD; Gigabyte Aorus Extreme 1080ti 11Gb VRAM; Toshiba 43" LED TV @ 4k; Honeycomb Bravo.

 

  • 2 months later...

Are you referring to this?

01.jpg02.jpg03.jpg04.jpg

13600KF - AIO - 32GB DDR4 - RTX4070 - UW1440p GSync - USB DAC - 2TB NVMe - Windows 11 Pro - Gladiator NXT EVO - 1 Gbps Fiber  - MSFS 2024

  • 2 months later...
On 12/23/2022 at 4:22 PM, spilok said:

I tried this edit, and I'm pretty pleased with it.  It really does make the cloud renditions so much better if you're using the sim without EA.  Sometimes I do change to a non-EA environment because the cockpits are brighter and the world is a bit brighter too.

Stan

Stan - go to NVIDIA settings > change resolution >output dynamic range > set to limited.

Dynamic range set to full.

In my case that brightens whole sim in EA mode.

Artur 

4 hours ago, Beardyman said:

Stan - go to NVIDIA settings > change resolution >output dynamic range > set to limited.

Dynamic range set to full.

In my case that brightens whole sim in EA mode.

Thanks.  I'll check it out

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.