Skip to content

Commit

Permalink
Fixed|Renderer|Client: Drawing of sky domes with multiple layers
Browse files Browse the repository at this point in the history
IssueID #1736
  • Loading branch information
danij-deng committed Apr 4, 2014
1 parent 29cf847 commit 5a55f5d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doomsday/client/src/render/sky.cpp
Expand Up @@ -241,6 +241,7 @@ DENG2_PIMPL(Sky)
if(layers[i].isActive())
{
firstActiveLayer = i;
break;
}
}
}
Expand All @@ -257,6 +258,12 @@ DENG2_PIMPL(Sky)
Vector3f bottomCapColor;
Vector3f topCapColor;

if(needUpdateFirstActiveLayer)
{
updateFirstActiveLayer();
}
if(firstActiveLayer < 0) return;

/**
* @todo Re-implement me by rendering the sky to a low-quality cubemap
* and use that to obtain the lighting characteristics.
Expand Down Expand Up @@ -799,6 +806,7 @@ static void configureSphereDrawState(Sky &sky, int layerIndex, hemispherecap_t s
static void drawHemisphere(Sky &sky, SphereComponentFlags flags)
{
int const firstLayer = sky.firstActiveLayer();
DENG2_ASSERT(firstLayer > 0); // 1-based

bool const yflip = flags.testFlag(LowerHemisphere);
hemispherecap_t cap = flags.testFlag(LowerHemisphere)? HC_BOTTOM : HC_TOP;
Expand Down

0 comments on commit 5a55f5d

Please sign in to comment.