Add atmosphere height to culling radius

pull/1175/head
Levin Li 2021-11-17 09:44:27 +08:00
parent e686619f2e
commit 5f947cfa2c
1 changed files with 3 additions and 6 deletions

View File

@ -1174,15 +1174,12 @@ void Body::recomputeCullingRadius()
{
float r = getBoundingRadius();
if (atmosphere)
r += max(atmosphere->height, atmosphere->cloudHeight);
if (rings)
r = max(r, rings->outerRadius);
if (atmosphere)
{
r = max(r, atmosphere->height);
r = max(r, atmosphere->cloudHeight);
}
if (referenceMarks)
{
for (const auto rm : *referenceMarks)