Index: src/core/SkRadialShadowMapShader.cpp |
diff --git a/src/core/SkRadialShadowMapShader.cpp b/src/core/SkRadialShadowMapShader.cpp |
index 24b54a5e2be3a1f2271c194b7e2dddbf076e1ff7..29773a63b513f3aaa6eb8fc6be87f92b708f6cb2 100644 |
--- a/src/core/SkRadialShadowMapShader.cpp |
+++ b/src/core/SkRadialShadowMapShader.cpp |
@@ -142,7 +142,9 @@ public: |
// Modify the input texture coordinates to index into our 1D output |
fragBuilder->codeAppend("float distHere;"); |
- fragBuilder->codeAppend("float closestDistHere = 0;"); |
+ |
+ // we use a max shadow distance of 2 times the max of width/height |
+ fragBuilder->codeAppend("float closestDistHere = 2;"); |
fragBuilder->codeAppend("vec2 coords = vMatrixCoord_0_0_Stage0;"); |
fragBuilder->codeAppend("coords.y = 0;"); |
fragBuilder->codeAppend("vec2 destCoords = vec2(0,0);"); |