Check cim's last response on PR#153 on github, it could contain info related to the reason for your problem and also gives a possible workaround method (could be tricky to implement without core changes but you never know till you give it a try):
https://github.com/OoliteProject/oolite/pull/153
DrawDistance for effects And planets
Moderators: winston, another_commander
-
- Quite Grand Sub-Admiral
- Posts: 6680
- Joined: Wed Feb 28, 2007 7:54 am
Re: DrawDistance for effects And planets
Thanks for the heads up. I have tried different things with no succes. One thing strikes me as odd though.That is that even at beyond 2^32 range i can still see the atmosphere when forcing it via a little extra code(atmDistance>2^32:opacity = 0.75) in the atmosphere shader thus proving at point that a shader can operate at ranges above 2^32. So im thinking it is the planet shader that is somehow preventing rendering above those distances.another_commander wrote: ↑Sun Jan 15, 2017 10:03 amCheck cim's last response on PR#153 on github, it could contain info related to the reason for your problem and also gives a possible workaround method (could be tricky to implement without core changes but you never know till you give it a try):
https://github.com/OoliteProject/oolite/pull/153
so i'm still tinkering, trying to find a solution.
Bounty Scanner
Number 935
Number 935
Re: DrawDistance for effects And planets
There's a difference between "operate" and "operate well" - the main limitation is the depth buffer, which because of the way they work has an effective range of only around 10^6 (and is getting a bit flaky once you go much beyond scanner range). The whole two-pass thing was supposed to give us the ability to go beyond the limitations of a single depth buffer ... but it's not at all straightforward to get right!
OOPlanetEntity.m line 600 onwards used to switch between "near" and "far" rendering modes for the atmosphere as the distance to the planet approached 10^6 - this was a very visible transition, so it currently uses "far" mode all the time. That still needs fixing up, and may have something to do with this.
2^32 isn't particularly relevant - OpenGL uses 32-bit floats, not 32-bit ints - so you just get increasing imprecision with increased distance. The absolute limit would be somewhere over 10^38 but you wouldn't be able to do anything useful with it.
Re: DrawDistance for effects And planets
But it is at that exact distance the planet Completely vanishes, so it is relevant as a hint.
I tested so many things so i cant remember how this applies to the github source with pull request 153 applied.
Bounty Scanner
Number 935
Number 935