Skip to content

Commit

Permalink
Fix #2460 bad moon texture
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Mar 4, 2024
1 parent baed879 commit 194cfb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/osgEarthDrivers/sky_simple/SimpleSkyNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ namespace

if (genTexCoords)
{
float s = 0.5 + (1.0 - ((lon + 180) / 360.0));
float s = (lon + 180) / 360.0;
float t = (lat + 90.0) / 180.0;
texCoords->push_back(osg::Vec2(s, t));
}
Expand All @@ -146,7 +146,7 @@ namespace

if (y < latSegments && x < lonSegments)
{
int x_plus_1 = x + 1; // x < lonSegments - 1 ? x + 1 : 0;
int x_plus_1 = x + 1;
int y_plus_1 = y + 1;
el->push_back(y * row_size + x);
el->push_back(y * row_size + x_plus_1);
Expand Down

0 comments on commit 194cfb9

Please sign in to comment.