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

Unified Diff: gm/shadowmaps.cpp

Issue 2224163005: Made shadows blurry (thru implementing variance mapping) (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Trying different include path 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 | gyp/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/shadowmaps.cpp
diff --git a/gm/shadowmaps.cpp b/gm/shadowmaps.cpp
index f953550d4bb55ac74b169d96dc64a8c261f6d4d7..6c9738b2478ed70446ca461f5c364b257ab1dc84 100644
--- a/gm/shadowmaps.cpp
+++ b/gm/shadowmaps.cpp
@@ -76,6 +76,11 @@ public:
SkVector3::Make(0.1f, 0.2f, 1.0f)));
builder.add(SkLights::Light::MakeAmbient(SkColor3f::Make(0.4f, 0.4f, 0.4f)));
fLights = builder.finish();
+
+ fShadowParams.fShadowRadius = 4.0f;
+ fShadowParams.fBiasingConstant = 0.3f;
+ fShadowParams.fMinVariance = 1024;
+ fShadowParams.fType = SkShadowParams::kVariance_ShadowType;
}
protected:
@@ -95,11 +100,12 @@ protected:
// It's used to generate the depth maps.
sk_sp<SkPicture> pic(make_test_picture(kWidth, kHeight));
canvas->setLights(fLights);
- canvas->drawShadowedPicture(pic, nullptr, nullptr);
+ canvas->drawShadowedPicture(pic, nullptr, nullptr, fShadowParams);
}
private:
sk_sp<SkLights> fLights;
+ SkShadowParams fShadowParams;
typedef GM INHERITED;
};
« no previous file with comments | « no previous file | gyp/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698