Closed Atque closed 1 year ago
I don't reproduce this. Please give more detailed instructions, the log, and possibly screenshots or a screencast.
First it looks normal:
But looking too far down, yields a white, broken atmosphere:
Looking even further towards the nadir, Stellarium gets incredibly slow (0.2 FPS). Disabling atmosphere gives normal FPS rates.
Log: log.txt
I fear this might be yet another AMD trouble?
Edit: Hmmm. ShowMySky works fine (no mie scattering below horizon), using the CMS master. Edit II: Oh, no wait. There's a hole in the sky near nadir there as well :/
I had though this was solved by cmake/CPM magic: SMS not found on Windows. I had my SMS library from January. Is there a new version? Please add instructions to BUILDING.md.
SMS not found on Windows
This is irrelevant to this issue.
I fear this might be yet another AMD trouble?
May well be.
Edit: Hmmm. ShowMySky works fine (no mie scattering below horizon), using the CMS master. Edit II: Oh, no wait. There's a hole in the sky near nadir there as well :/
Could you recompute the model via calcmysky
adding --radiance
argument to the command line, and show me the radiance spectrum of the broken nadir area?
Could you recompute the model via
calcmysky
adding--radiance
argument to the command line, and show me the radiance spectrum of the broken nadir area?
This is the result:
OK, I suppose it may be a problem with the GPU implementation of tanh
function. Normally it should yield 1.0 for large arguments, but maybe your GPU spits something inedible. What if you use the following patch for CalcMySky?
diff --git a/shaders/render.frag b/shaders/render.frag
index 7c264b6..5287267 100644
--- a/shaders/render.frag
+++ b/shaders/render.frag
@@ -125,7 +125,7 @@ void main()
// forward scattering peak. The second factor, with tanh, makes the
// transition near sunset from a bit above horizon to a bit below smoother.
pseudoMirrorDepth = sqr(max(0, dot(viewDir, sunDirection))) *
- tanh(150 * (newViewElev - horizElev) / (PI/2 - horizElev));
+ tanh(min(10, 150 * (newViewElev - horizElev) / (PI/2 - horizElev)));
}
CONST float cosSunZenithAngle =dot(zenith,sunDirection);
(Note that to fully apply this patch, you need to regenerate the model.)
OK, I suppose it may be a problem with the GPU implementation of
tanh
function. Normally it should yield 1.0 for large arguments, but maybe your GPU spits something inedible. What if you use the following patch for CalcMySky?diff --git a/shaders/render.frag b/shaders/render.frag index 7c264b6..5287267 100644 --- a/shaders/render.frag +++ b/shaders/render.frag @@ -125,7 +125,7 @@ void main() // forward scattering peak. The second factor, with tanh, makes the // transition near sunset from a bit above horizon to a bit below smoother. pseudoMirrorDepth = sqr(max(0, dot(viewDir, sunDirection))) * - tanh(150 * (newViewElev - horizElev) / (PI/2 - horizElev)); + tanh(min(10, 150 * (newViewElev - horizElev) / (PI/2 - horizElev))); } CONST float cosSunZenithAngle =dot(zenith,sunDirection);
I have never managed to build CMS from source (only used the stable releases or builds from Appveyor). Could you provide a binary?
You can take an artifact from an AppVeyor build. Just apply the patch to the render.frag
file you can find inside.
Oh yeah, of course, those can be altered after the build.
The fix you provided seems to have solved this. No more hole in the nadir area, and the area below the horizon looks better when Mie scattering is not mirrored:
This is how it is supposed to look, right? If so, the issue can be closed.
I'll push this fix, and the commit will close this issue.
Hello @Atque!
Please check the fresh version (development snapshot) of Stellarium: https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot
Hello @Atque!
Please check the latest stable version of Stellarium: https://github.com/Stellarium/stellarium/releases/latest
Using the latest master, the sky turns completely white using SMS and showing certain points of the sky. It appears the anti-solar point is broken. Using an older calculation of the sky textures, shows no problem.
Introduced by efa6b05?
Windows 10 64-bit Qt 6.4.2 AMD Radeon RX 5700 XT