Skip to content

Commit

Permalink
- fixed sky tiling.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jan 25, 2022
1 parent 0e89bff commit e3103ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/core/psky.cpp
Expand Up @@ -101,9 +101,9 @@ SkyDefinition getSky(int tilenum)
int w = tileWidth(tilenum);
if (result.lognumtiles == 0 || w >= 256)
{
int bits = sizeToBits(w);
result.lognumtiles = 11 - bits;
if ((1 << bits) < w) result.lognumtiles--; // round down if not a power of two
if (w < 512) result.lognumtiles = 2;
else if (w < 1024) result.lognumtiles = 1;
else result.lognumtiles = 0;
}

}
Expand Down

0 comments on commit e3103ff

Please sign in to comment.