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

Unified Diff: gm/shadowmaps.cpp

Issue 2237493002: Added PointLights to SkLights::Light (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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: gm/shadowmaps.cpp
diff --git a/gm/shadowmaps.cpp b/gm/shadowmaps.cpp
index b343d9b142221b60379c52901808e317462838d2..91447abc4e1b1ab40d2f6740bea920963b279ae6 100644
--- a/gm/shadowmaps.cpp
+++ b/gm/shadowmaps.cpp
@@ -70,11 +70,11 @@ public:
// - soft white ambient light
SkLights::Builder builder;
- builder.add(SkLights::Light(SkColor3f::Make(0.2f, 0.3f, 0.4f),
- SkVector3::Make(0.2f, 0.1f, 1.0f)));
- builder.add(SkLights::Light(SkColor3f::Make(0.4f, 0.3f, 0.2f),
- SkVector3::Make(0.1f, 0.2f, 1.0f)));
- builder.add(SkLights::Light(SkColor3f::Make(0.4f, 0.4f, 0.4f)));
+ builder.add(SkLights::Light::MakeDirectionalLight(SkColor3f::Make(0.2f, 0.3f, 0.4f),
+ SkVector3::Make(0.2f, 0.1f, 1.0f)));
+ builder.add(SkLights::Light::MakeDirectionalLight(SkColor3f::Make(0.4f, 0.3f, 0.2f),
+ SkVector3::Make(0.1f, 0.2f, 1.0f)));
+ builder.add(SkLights::Light::MakeAmbientLight(SkColor3f::Make(0.4f, 0.4f, 0.4f)));
fLights = builder.finish();
}

Powered by Google App Engine
This is Rietveld 408576698