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

Unified Diff: gm/lightingshader.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
« no previous file with comments | « no previous file | gm/lightingshader2.cpp » ('j') | include/core/SkLights.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/lightingshader.cpp
diff --git a/gm/lightingshader.cpp b/gm/lightingshader.cpp
index 54318ee445d661ca61d1e3f545ca49ea58497438..6ce622ff6e567cc8ec5a4472c1ef24c0dc638bb3 100644
--- a/gm/lightingshader.cpp
+++ b/gm/lightingshader.cpp
@@ -48,11 +48,11 @@ public:
SkLights::Builder builder;
robertphillips 2016/08/10 16:34:37 I don't think we need the Light suffix (e.g., just
- builder.add(SkLights::Light(SkColor3f::Make(1.0f, 1.0f, 1.0f),
- SkVector3::Make(SK_ScalarRoot2Over2,
- 0.0f,
- SK_ScalarRoot2Over2)));
- builder.add(SkLights::Light(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
+ builder.add(SkLights::Light::MakeDirectionalLight(SkColor3f::Make(1.0f, 1.0f, 1.0f),
+ SkVector3::Make(SK_ScalarRoot2Over2,
+ 0.0f,
+ SK_ScalarRoot2Over2)));
+ builder.add(SkLights::Light::MakeAmbientLight(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
fLights = builder.finish();
}
« no previous file with comments | « no previous file | gm/lightingshader2.cpp » ('j') | include/core/SkLights.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698