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

Commit d5a8503c authored by ztenghui's avatar ztenghui Committed by Android (Google) Code Review
Browse files

Merge "Fix the missing spot shadow when DEBUG_SHADOW is turned on"

parents 033a68ca 99af9429
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -62,7 +62,9 @@ static float rayIntersectPoints(const Vector2& rayOrigin, float dx, float dy,

#if DEBUG_SHADOW
    double interpVal = (dx * (p1.y - rayOrigin.y) + dy * rayOrigin.x - dy * p1.x) / divisor;
    if (interpVal < 0 || interpVal > 1) return -1.0f; // error, doesn't intersect between points
    if (interpVal < 0 || interpVal > 1) {
        ALOGW("rayIntersectPoints is hitting outside the segment %f", interpVal);
    }
#endif

    double distance = (p1.x * (rayOrigin.y - p2.y) + p2.x * (p1.y - rayOrigin.y) +