Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1725)

Unified Diff: include/core/SkLights.h

Issue 2198933002: Making a sample for shadow maps for more intensive development (Closed) Base URL: https://skia.googlesource.com/skia@shadow-gm
Patch Set: undo change Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/core/SkLights.h
diff --git a/include/core/SkLights.h b/include/core/SkLights.h
index 0b23cc14aa01fa742133e5dfdf332f24d8e6a334..fde6b27484f6b71b64f03686651b583e28cde8c9 100644
--- a/include/core/SkLights.h
+++ b/include/core/SkLights.h
@@ -55,6 +55,13 @@ public:
return fShadowMap;
}
robertphillips 2016/08/02 16:05:06 The entire idea of having the builder and then bui
vjiaoblack 2016/08/03 14:04:20 Done.
+ void setDir(SkVector3 newDir) {
+ fDirection = newDir;
+ if (!fDirection.normalize()) {
+ fDirection.set(0.0f, 0.0f, 1.0f);
+ }
+ }
+
Light& operator= (const Light& b) {
if (this == &b)
return *this;

Powered by Google App Engine
This is Rietveld 408576698