Oolite Bulletins
http://bb.aegidian.org/

DrawDistance for effects And planets
http://bb.aegidian.org/viewtopic.php?f=6&t=18559
Page 2 of 2

Author:  another_commander [ Sun Jan 15, 2017 10:03 am ]
Post subject:  Re: DrawDistance for effects And planets

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

Author:  Frame [ Mon Jan 16, 2017 3:35 pm ]
Post subject:  Re: DrawDistance for effects And planets

Quote:
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
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.

so i'm still tinkering, trying to find a solution.

Author:  cim [ Tue Jan 17, 2017 9:40 pm ]
Post subject:  Re: DrawDistance for effects And planets

Quote:
thus proving at point that a shader can operate at ranges above 2^32.
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.

Author:  Frame [ Fri Jan 20, 2017 4:41 pm ]
Post subject:  Re: DrawDistance for effects And planets

Quote:
2^32 isn't particularly relevant
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.

Page 2 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/