Mad_Shell Posted October 2, 2023 Posted October 2, 2023 This work is not mine, I copy paste what the dude (Maya on discord) wrote on the discord bug channel so his work attracts attention from ED. "Hi, has anyone thought that the sunrises & sunsets in DCS are a bit too purple? I'm a graphics programmer who's familiar with Eric Bruneton's (which is used in DCS) and Sebastien Hillaire's atmosphere models and I found a "bug" in their implementation which causes the sky to be too purple and developed a tool called ARPC which allows accurately calculating the atmosphere parameters. Basically both Bruneton's and Hillaire's models pick 3 primary wavelengths for red, green and blue to determine Rayleigh scattering and Ozone absorption coefficients, but this method simply doesn't have enough precision to take especially the Ozone absorption spectrum into account. ARPC on the other hand uses CIE 1931 XYZ color matching functions to take a weighted average of the coefficients for all wavelengths when calculating the coefficients for red, green and blue. This approach gets much closer the spectrally rendered path-traced reference, which has more blue-tinted sunrises / sunsets. It also calculates a few other parameters such as the scale height and ozone distribution more accurately, by using ISA instead of the constant temperature atmosphere used in Bruneton's and Hillaire's models. If anyone's from ED is interested, I can provide more technical details regarding how ARPC works. It's already open source (MIT licensed, so can be integrated to any commercial project without any royalties) and available on GitHub: https://github.com/FarukEroglu2048/ARPC Here's a quick comparison with the ARPC coefficients, I changed the coefficients in the shader code for it: Default Coefficients: ARPC Coefficients: Here's another comparison using a ShaderToy implementation of Hillaire's atmosphere model: Hillaire's Original Coefficients: ARPC Coefficients: To validate my approach with ARPC, I used a root finding algorithm which tried to find the scattering and absorption coefficients which minimized the error between the spectrally rendered reference and also converted a reference spectral light source and the transmitted light spectrum after it passes through the atmosphere into sRGB to solve for the coefficients. In both cases, the expected coefficients almost perfectly matched the coefficients calculated by my approach: Under the spectrum calculations section, the first line is Rayleigh scattering coefficients and the next line is Ozone absorption coefficients for red, green and blue, calculated using ARPC. And below them, the array shown by “x” contains the Rayleigh scattering and Ozone absorption coefficients that match the spectrally rendered reference the best, found by the root finding algorithm. You can see that they are in great agreement with the ARPC coefficients. Even without more rigorous tests like that, the results with the ARPC coefficients are visually very close to the spectrally rendered path-traced reference." 8 6
RogueSpecterGaming Posted October 2, 2023 Posted October 2, 2023 Finally. This amazing work and hopefully ED sees this and implements it or changes it. The sky is waaay too purple in the SIM. 1 My PC: GPU-AMD 6800XT OC / CPU- AMD RYZEN 5800X OC / 32 GB RAM 3200Mhz / 1TB SSD / 2TB HDD / 500GB M.2 / Monitor: 34" Ultrawide Samsung 1000R Curve / WinWing F16EX HOTAS / TM Cougar MFDs / TM TPR Rudder Pedals / TrackIR5 / ICP
ED Team BIGNEWY Posted October 3, 2023 ED Team Posted October 3, 2023 Hi, I will ask the team to take a look. thank you 3 Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, PIMAX Crystal
ED Team BIGNEWY Posted October 3, 2023 ED Team Posted October 3, 2023 I have spoken to the team and they are aware, we do plan to revisit atmosphere in DCS in the future. thank you 6 6 Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, PIMAX Crystal
Bazz_Mulder Posted December 17, 2025 Posted December 17, 2025 (edited) Wow, such a small tweak but a huge visual change! Unfortunately, it's throwing an IC check fail @BIGNEWY Its just a change in one line and the team has been checking that for 2 years already. Quote Firstly go to DCS root folder and find Bazar/Shaders/enlight/atmDefinitions.hlsl Create a backup of it at somewhere safe, such as your desktop Open it with a text editor and find the line that says atmosphere.absorption_extinction = gAtmBetaAExt; Replace it with atmosphere.absorption_extinction = float3(2.29e-3, 1.54e-3, 0.0); and save the file Can we have this finally implemented? Edit: A drawback is that many new shader files are being generated when starting new maps for the first time. Not sure if ED can optimize that. Blueish sky is with the tweaked value: Edited December 18, 2025 by Bazz_Mulder 5 3 Kowalsky - "Fox 3" simply means that you have commitment issues
Mud Posted December 18, 2025 Posted December 18, 2025 On 12/17/2025 at 4:21 PM, Bazz_Mulder said: Wow, such a small tweak but a huge visual change! Unfortunately, it's throwing an IC check fail @BIGNEWY Its just a change in one line and the team has been checking that for 2 years already. Can we have this finally implemented? I wanted to try it out but unfortunately my DCS just hangs when loading a mission in the ME when using the modified atmDefinitions.hlsl file. Nevada map. Specs in my signature. Br, Mud Spoiler W10 Enterprise LTSC | B650E Gigabyte Aorus Master | AMD Ryzen 7 7800X3D | Noctua NH-D15 G.Skill Trident ZS Neo DDR5-6000 64Gb | MSI RTX 5080 Gaming Trio OC Asus Xonar AE | VPforce Rhino + TM Hotas Warthog MFG Crosswind pedals | Valve Index
Bazz_Mulder Posted December 18, 2025 Posted December 18, 2025 (edited) Same on my end; a lot of new shader files are compiled when starting each map which takes some time. You can see that in the growing file's number in the saved "FXO" folder. Not sure if ED can optimize that. Edited December 18, 2025 by Bazz_Mulder Kowalsky - "Fox 3" simply means that you have commitment issues
draconus Posted December 19, 2025 Posted December 19, 2025 15 hours ago, Bazz_Mulder said: a lot of new shader files are compiled when starting each map which takes some time. You can see that in the growing file's number in the saved "FXO" folder. Not sure if ED can optimize that. This is normal. If something in rendering code changes the shader files have to be compiled again. Win10 i7-10700KF 32GB RTX4070S Quest 3 T16000M VPC CDT-VMAX TFRP FC3 MiG-29A F-14A/B F-15E C-130J CA SC NTTR PG Syria
Mud Posted December 19, 2025 Posted December 19, 2025 On 12/18/2025 at 7:25 PM, Bazz_Mulder said: Same on my end; a lot of new shader files are compiled when starting each map which takes some time. You can see that in the growing file's number in the saved "FXO" folder. Not sure if ED can optimize that. Yeah indeed. I gave it another shot with a solid dose of patience and eventually the map loaded fine. I ended up with around twice as much shader files (511) in the fxo folder. Does anyone know if this modification also impacts performance once in the pit? Cheers, Mud Spoiler W10 Enterprise LTSC | B650E Gigabyte Aorus Master | AMD Ryzen 7 7800X3D | Noctua NH-D15 G.Skill Trident ZS Neo DDR5-6000 64Gb | MSI RTX 5080 Gaming Trio OC Asus Xonar AE | VPforce Rhino + TM Hotas Warthog MFG Crosswind pedals | Valve Index
Bazz_Mulder Posted December 19, 2025 Posted December 19, 2025 (edited) 2 hours ago, Mud said: Yeah indeed. I gave it another shot with a solid dose of patience and eventually the map loaded fine. I ended up with around twice as much shader files (511) in the fxo folder. Does anyone know if this modification also impacts performance once in the pit? Cheers, Mud I was unable to see any performance drop. Edited December 19, 2025 by Bazz_Mulder 1 Kowalsky - "Fox 3" simply means that you have commitment issues
Recommended Posts