December 13, 20214 yr From Beau Hollis: https://www.prepar3d.com/forum/viewtopic.php?f=6312&t=143957&start=30 Here is a copy and paste: 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\ShadersIf P3D is running, shut it down and start it back up again.If, after giving it some time to load shaders, everything is black, something went wrong. In that case you need to revert to the backup copy and clear the shader cache again. Almost every shader includes this header so any syntax error here will mean that most shaders won't compile. Edited December 13, 20214 yr by pgde 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.
December 13, 20214 yr I wonder if TOGA can apply this to envshade somehow since this may or may not work for those of us using it. 5800X3D, 4090FE, 64GB DDR4 3600C16, Gigabyte X570S MB, EVO 970 M.2's, Alienware 3821DW and 2 22" monitors, Corsair RM1000x PSU, 360MM MSI MEG, MFG Crosswind, T16000M Stick, Boeing TCA Yoke/Throttle, Skalarki MCDU and FCU, Logitech Radio Panel/Switch Panel, Spad.Next
December 13, 20214 yr Hi, I'm not able to understand what to do. COuld anybody post the modfied file Thank's Yves from ELLX. Yves SAMUEL ELLX
December 13, 20214 yr Author 53 minutes ago, micstatic said: I wonder if TOGA can apply this to envshade somehow since this may or may not work for those of us using it. I have already contacted their tech support and asked this. Stay tuned and I will post when I receive an answer! 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.
December 13, 20214 yr 1 hour ago, yvesamuel said: Hi, I'm not able to understand what to do. COuld anybody post the modfied file Thank's Yves from ELLX. Here ya go......don't forget to follow the installation instructions. Modified FuncLibrary.fxh Oh, and as usual, install at your own risk. Edited December 13, 20214 yr by Sparkrite
December 13, 20214 yr Moderator @Sparkrite, I’ve hidden your post as it appears to me to be suspect. Please explain the purpose of your link. 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.
December 13, 20214 yr 10 minutes ago, Ray Proudfoot said: @Sparkrite, I’ve hidden your post as it appears to me to be suspect. Please explain the purpose of your link. @yvesamuel said he wasn't able to modify the file and asked if someone would do it for him and upload it, so I did as he requested. Was I in beach of some rule? If I was, then I apologize . Just trying to help someone out @Ray Proudfoot. BTW I couldn't find a way to attach a file to my post so just used 'Easy upload', hence the link. EDIT: out of interest, in what way did it 'appear suspect', please? Edited December 13, 20214 yr by Sparkrite
December 13, 20214 yr Moderator @Sparkrite, I understand. I’m not 100% sure if it contravenes AvSim or LM T&Cs but I’ve unhidden your post. I appreciate you’r trying to help, thanks. Users install this file at their own risk. 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.
December 13, 20214 yr Moderator 7 minutes ago, Sparkrite said: EDIT: out of interest, in what way did it 'appear suspect', please? I hadn’t read all posts in this topic and it was reported as possible breach of copyright. 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.
December 13, 20214 yr 2 hours ago, pgde said: From Beau Hollis: https://www.prepar3d.com/forum/viewtopic.php?f=6312&t=143957&start=30 Here is a copy and paste: 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\ShadersIf P3D is running, shut it down and start it back up again.If, after giving it some time to load shaders, everything is black, something went wrong. In that case you need to revert to the backup copy and clear the shader cache again. Almost every shader includes this header so any syntax error here will mean that most shaders won't compile. it never cease to amaze me how developers/programmers in IT , (IE Beau Hollis) doesnt realise that to the "common garden pc user" this sort of stuff is about as daunting as it gets. If people stuggle with uninstalling client and content, how the blazes are they going to do the above, It would be like me giving Hollis an OPS-A and asking him to tell me in 10 mins whats the minimum flight time required for to augament a 3 man crew to extend an FDP and why. In short he wouldnt be able to do it, (neither would most people on here) he wouldnt know what im on about, because its not his field of expertise. Neither is amending XMLS/FXH for the average person. I swear these people have zero interpersonal skills I really do. They spend all their time writing code like this. It beggers belief. Edited December 13, 20214 yr by fluffyflops
December 13, 20214 yr 1 minute ago, Ray Proudfoot said: I hadn’t read all posts in this topic and it was reported as possible breach of copyright. Ah right. I'm no expert on copyright laws Ray, but I doubt if it's in breach as It is publicly available on LM's site, if that means anything. 😄 https://www.prepar3d.com/forum/viewtopic.php?f=6312&t=143957&start=30#
December 13, 20214 yr Author I think the mod is publicly available but not the entire file. 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.
December 13, 20214 yr Moderator 22 minutes ago, Sparkrite said: Ah right. I'm no expert on copyright laws Ray, but I doubt if it's in breach as It is publicly available on LM's site, if that means anything. 😄 https://www.prepar3d.com/forum/viewtopic.php?f=6312&t=143957&start=30# The line that needs amending is there - not the complete file. Unless admin interject it can stand. 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.
December 13, 20214 yr For anyone who might be struggling to add the line: Go to your main P3D install folder, find ShadersHSL folder. Open FuncLibrary.fxh file with notepad. CTRL+F, and search for return float4(fogInscatter, transmittance); After that, select the entire text, press backspace. And paste this info instead: #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 save the file. Do not make any further modifications. Once saved, delete shaders as usual and let them rebuild when starting P3D again.
Archived
This topic is now archived and is closed to further replies.