diff options
Diffstat (limited to 'src/core/SkLightingShader.cpp')
-rw-r--r-- | src/core/SkLightingShader.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp index 8fde8bfd37..b788b3c645 100644 --- a/src/core/SkLightingShader.cpp +++ b/src/core/SkLightingShader.cpp @@ -122,11 +122,9 @@ public: LightingFP(sk_sp<GrFragmentProcessor> normalFP, sk_sp<SkLights> lights) { // fuse all ambient lights into a single one - fAmbientColor.set(0.0f, 0.0f, 0.0f); + fAmbientColor = lights->ambientLightColor(); for (int i = 0; i < lights->numLights(); ++i) { - if (SkLights::Light::kAmbient_LightType == lights->light(i).type()) { - fAmbientColor += lights->light(i).color(); - } else if (SkLights::Light::kDirectional_LightType == lights->light(i).type()) { + if (SkLights::Light::kDirectional_LightType == lights->light(i).type()) { fDirectionalLights.push_back(lights->light(i)); // TODO get the handle to the shadow map if there is one } else { |