Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d829ab76 authored by Tenghui Zhu's avatar Tenghui Zhu Committed by android-build-merger
Browse files

Merge "When the incoming light source is invalid, don\'t generate any shadow"...

Merge "When the incoming light source is invalid, don\'t generate any shadow" into mnc-dr-dev am: 76d20b4a
am: 1c7fbe0e

* commit '1c7fbe0e':
  When the incoming light source is invalid, don't generate any shadow
parents efcb281b 1c7fbe0e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -80,6 +80,11 @@ void ShadowTessellator::tessellateSpotShadow(bool isCasterOpaque,
    ALOGD("light center %f %f %f %d",
            adjustedLightCenter.x, adjustedLightCenter.y, adjustedLightCenter.z, lightRadius);
#endif
    if (isnan(adjustedLightCenter.x)
            || isnan(adjustedLightCenter.y)
            || isnan(adjustedLightCenter.z)) {
        return;
    }

    // light position (because it's in local space) needs to compensate for receiver transform
    // TODO: should apply to light orientation, not just position