Skip to content

Commit

Permalink
Merge pull request #116 from LumaPictures/pr/light_decay
Browse files Browse the repository at this point in the history
support for linear / quadratic light decay in VP2.0
  • Loading branch information
fabal authored Sep 19, 2018
2 parents c4f4495 + 87fab1c commit 8d30f3a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/AL_USDMaya/AL/usdmaya/nodes/ProxyDrawOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,17 @@ void ProxyDrawOverride::draw(const MHWRender::MDrawContext& context, const MUser
{
MFloatArray fa;
lightParam->getParameter(paramNames[i], fa);
if (fa[0] == 0)
{
light.SetAttenuation(GfVec3f(1.0f, 0.0f, 0.0f));
}
else if (fa[0] == 1)
{
light.SetAttenuation(GfVec3f(0.0f, 1.0f, 0.0f));
}
else if (fa[0] == 2) {
light.SetAttenuation(GfVec3f(0.0f, 0.0f, 1.0f));
}
}
break;
case MHWRender::MLightParameterInformation::kDropoff:
Expand Down

0 comments on commit 8d30f3a

Please sign in to comment.