Fix shadow directional light bounds.

The shadowRec bounds code didn't handle directional lights, that's now
fixed. Also fixes normalization of the light direction -- it was only
using two components, it should use all three.

Bug: skia:10781
Change-Id: Ia7d39c5187f976627d017ac4abecbe1d1dc62712
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345126
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/gm/shadowutils.cpp b/gm/shadowutils.cpp
index 572324f..eca7f6b 100644
--- a/gm/shadowutils.cpp
+++ b/gm/shadowutils.cpp
@@ -266,7 +266,7 @@
     static constexpr SkScalar kHeight = 12.f;
 
     SkPath rrect(SkPath::RRect(SkRect::MakeLTRB(-25, -25, 25, 25), 10, 10));
-    SkPoint3 lightPos = { -45, -45, 500 };
+    SkPoint3 lightPos = { -45, -45, 45 };
 
     SkColor ambientColor = SkColorSetARGB(0.02f * 255, 0, 0, 0);
     SkColor spotColor = SkColorSetARGB(0.35f * 255, 0, 0, 0);