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

Side by Side Diff: gm/shadowmaps.cpp

Issue 2291663002: Revert of Moved ambient lights out of SkLight's light array (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « gm/lightingshaderbevel.cpp ('k') | include/core/SkLights.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "gm.h" 9 #include "gm.h"
10 #include "SkPathEffect.h" 10 #include "SkPathEffect.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Create a light set consisting of 67 // Create a light set consisting of
68 // - bluish directional light pointing more right than down 68 // - bluish directional light pointing more right than down
69 // - reddish directional light pointing more down than right 69 // - reddish directional light pointing more down than right
70 // - soft white ambient light 70 // - soft white ambient light
71 71
72 SkLights::Builder builder; 72 SkLights::Builder builder;
73 builder.add(SkLights::Light::MakeDirectional(SkColor3f::Make(0.2f, 0.3f, 0.4f), 73 builder.add(SkLights::Light::MakeDirectional(SkColor3f::Make(0.2f, 0.3f, 0.4f),
74 SkVector3::Make(0.2f, 0.1f, 1.0f))); 74 SkVector3::Make(0.2f, 0.1f, 1.0f)));
75 builder.add(SkLights::Light::MakeDirectional(SkColor3f::Make(0.4f, 0.3f, 0.2f), 75 builder.add(SkLights::Light::MakeDirectional(SkColor3f::Make(0.4f, 0.3f, 0.2f),
76 SkVector3::Make(0.1f, 0.2f, 1.0f))); 76 SkVector3::Make(0.1f, 0.2f, 1.0f)));
77 builder.setAmbientLightColor(SkColor3f::Make(0.4f, 0.4f, 0.4f)); 77 builder.add(SkLights::Light::MakeAmbient(SkColor3f::Make(0.4f, 0.4f, 0.4 f)));
78 fLights = builder.finish(); 78 fLights = builder.finish();
79 79
80 fShadowParams.fShadowRadius = 4.0f; 80 fShadowParams.fShadowRadius = 4.0f;
81 fShadowParams.fBiasingConstant = 0.3f; 81 fShadowParams.fBiasingConstant = 0.3f;
82 fShadowParams.fMinVariance = 1024; 82 fShadowParams.fMinVariance = 1024;
83 fShadowParams.fType = SkShadowParams::kVariance_ShadowType; 83 fShadowParams.fType = SkShadowParams::kVariance_ShadowType;
84 } 84 }
85 85
86 protected: 86 protected:
87 static const int kWidth = 400; 87 static const int kWidth = 400;
(...skipping 20 matching lines...) Expand all
108 SkShadowParams fShadowParams; 108 SkShadowParams fShadowParams;
109 typedef GM INHERITED; 109 typedef GM INHERITED;
110 }; 110 };
111 111
112 ////////////////////////////////////////////////////////////////////////////// 112 //////////////////////////////////////////////////////////////////////////////
113 113
114 DEF_GM(return new ShadowMapsGM;) 114 DEF_GM(return new ShadowMapsGM;)
115 } 115 }
116 116
117 #endif 117 #endif
OLDNEW
« no previous file with comments | « gm/lightingshaderbevel.cpp ('k') | include/core/SkLights.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698