P3D V5.3 Missing Horizon/Atmo Haze

Any issues, problems or troubleshooting topics related to the Prepar3D client application.
Aussie1234
Posts: 147
Joined: Mon Jun 12, 2017 3:12 am
Location: YSCB

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by Aussie1234 »

Sorry 737 Sim guy,
I know it needs to be coded :-) but what I meant was, a few versions ago, I followed good advice here and modified some code in a couple of files. It worked, and fixed the particular problem. Then later a HF came out, and it replaced another file, and then, combined with the two other files I had modified, created entirely different problems for me. Took me a long time to fix as I had forgotten which files I had modified code in.

What I was saying was, It would be nice to have an official LM replacement file, to fix the missing horizon haze, without using an XML editor.

Aussie
P3d V6: ProSim-AR B737 suite: Fully enc. 737 Cockpit:
ASky6: Orbx world: GSX2: Pilot2ATC: Open Cockpits & Simworld h'dware:
Ext view - 4 LCD monitors, 210' viewgroup from 1x RTX 4080 16Gb. Main i9-13900K MSI 64GB.
737SimGuy
Posts: 71
Joined: Tue Apr 01, 2014 9:40 pm
Location: Northern California

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by 737SimGuy »

Aussie1234 wrote: Sun Dec 19, 2021 11:06 pm Sorry 737 Sim guy,
I know it needs to be coded :-) but what I meant was, a few versions ago, I followed good advice here and modified some code in a couple of files. It worked, and fixed the particular problem. Then later a HF came out, and it replaced another file, and then, combined with the two other files I had modified, created entirely different problems for me. Took me a long time to fix as I had forgotten which files I had modified code in.

What I was saying was, It would be nice to have an official LM replacement file, to fix the missing horizon haze, without using an XML editor.

Aussie
Yes of course, totally understand. I was just trying to be tongue n cheek silly :-)
If we can’t smile once n awhile through all this then what’s the point right? Hehehehe. It’s nice to see LM is still in the game…

James
User avatar
Daveo
Posts: 101
Joined: Tue Dec 31, 2013 12:41 am
Location: ESSB
Contact:

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by Daveo »

[quote=Aussie1234 post_id=251160 time=1639955161 user_id=119790]
Sorry 737 Sim guy,
I know it needs to be coded :-) but what I meant was, a few versions ago, I followed good advice here and modified some code in a couple of files. It worked, and fixed the particular problem. Then later a HF came out, and it replaced another file, and then, combined with the two other files I had modified, created entirely different problems for me. Took me a long time to fix as I had forgotten which files I had modified code in.

What I was saying was, It would be nice to have an official LM replacement file, to fix the missing horizon haze, without using an XML editor.

Aussie
[/quote]

After 20+ years I still use Lotus Notes for saving things like this.
Easy to forget stuff after so many changes, tweaks and mods over the years.
Gettin older doesn't help much either.
Dave Opper
ESSB
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by Beau Hollis »

The hot fix is live now.
Beau Hollis
Prepar3D Software Architect
User avatar
Daveo
Posts: 101
Joined: Tue Dec 31, 2013 12:41 am
Location: ESSB
Contact:

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by Daveo »

Thanks Beau!

Happy Holidays.
Dave Opper
ESSB
mfannee
Posts: 67
Joined: Sat Dec 15, 2018 9:22 pm

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by mfannee »

Hi,

I just installed the Hotfix Update 5.3.15.28131 (client + scenery) and ran 'Delete generated files'. But it looks like the haze problem isn't properly fixed yet: flying with clear sky, mountains at a distance keeps growing or shrinking like before...

I tried to solve that by re-using the fix to ShadersHLSL/FuncLibrary.fxh provided in this thread before the Hotfix was issued, but that doesn't work anymore in the Hotfix version...

hmmmm.....

should I do a full re-install instead? (it wasn't required according to this: https://www.prepar3d.com/news/announcem ... 12/120943/)
mfannee
Posts: 67
Joined: Sat Dec 15, 2018 9:22 pm

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by mfannee »

OK:

Now I completely removed P3D (also the folders in %appdata% and so on) and did a clean install of the Updated Hotfix.

The haze is back, so it works as expected now.
jgoggi
Posts: 168
Joined: Tue Oct 27, 2015 10:47 am

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by jgoggi »

Hi,
I installed 5.3 HF1 update 1 and I see that, with EA on, even with CAVOK and unlimited visibility, there is a lot of haze, I would almost call it slight fog. Is there a way to reduce it? Thanks.
small_anomaly
Posts: 8
Joined: Mon Jun 14, 2021 9:10 pm

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by small_anomaly »

I tried the FuncLibrary.fxh fix in my P3D V5.3 HF2, and it didn't work, everything was black. I assume it was meant for HF1 and was rolled out in HF2, but I still have the issue of a slightly fixed haze. It's not as bad as the solid line, flickering terrain, but it still is relatively solid as other people were saying.
User avatar
downscc
Posts: 1623
Joined: Mon Dec 01, 2014 5:46 pm
Location: KCRP

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by downscc »

small_anomaly wrote: Fri Feb 04, 2022 9:04 pm I tried the FuncLibrary.fxh fix in my P3D V5.3 HF2, and it didn't work, everything was black. I assume it was meant for HF1 and was rolled out in HF2, but I still have the issue of a slightly fixed haze. It's not as bad as the solid line, flickering terrain, but it still is relatively solid as other people were saying.
I had a black screen too after doing the fxh fix, and it turned out that using the select code leaves out the last line. After manually entering the last line "return float4(....." and the closing } it worked as expected.
Dan Downs
KCRP
small_anomaly
Posts: 8
Joined: Mon Jun 14, 2021 9:10 pm

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by small_anomaly »

Cool thanks
AhmedP3D
Posts: 1
Joined: Fri Apr 01, 2022 11:33 pm

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by AhmedP3D »

Does this fix only work with no addons installed such has active sky,Active sky cloud art? If so would I have too uninstall these addons and not install them after I’ve implemented the fix? Or it is possible too install the addons after I’ve implemented the fix?
otreblA
Posts: 11
Joined: Mon Dec 14, 2015 4:25 pm

Re: P3D V5.3 Missing Horizon/Atmo Haze

Post by otreblA »

Beau Hollis wrote: Mon Dec 13, 2021 5:48 pm Hello all,

We have a shader fix to bring back the horizon fade behavior while maintaining the improvements made to fog blending and curvature correction of layers below the camera. Since it's is a shader-only change, I will post instructions below for those that want to try it before we put out an official fix.

Note this instructions assume default P3D shaders, so if you are using an add-on that modified our shaders this may not work as exptected. Also note that you will need write permissions to your install directory which may require admin rights.

First locate ShadersHLSL\FuncLibrary.fxh and save a backup copy in case you into any issues.

Open ShadersHLSL\FuncLibrary.fxh in a text editor and look for this line of code:

Code: Select all

    return float4(fogInscatter, transmittance);
It should be around line 505 at the end of a function called CalculateFogAndTransmittance. Once you find it you can replace it with this:

Code: Select all

#if !defined(SHD_ENHANCED_ATMOSPHERICS_BLEND) && !defined(SHD_TO_FAR_CLIP)
    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);
Then clear your shader cache by removing this folder or deleting it's contents:
%LocalAppData%\Lockheed Martin\Prepar3D v5\Shaders
Has this been fixed in v5.4? I applied the fix and have this sun/atmosphere:

Image
EA off.
Post Reply