Index: src/gpu/GrOvalRenderer.cpp |
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp |
index 527b96e2c64a7f88e8637f8458e1311ef6c99ae9..89e35a1d707d49160005db46d0d289b66fc7bfad 100644 |
--- a/src/gpu/GrOvalRenderer.cpp |
+++ b/src/gpu/GrOvalRenderer.cpp |
@@ -139,10 +139,10 @@ public: |
if (args.fDistanceVectorName) { |
fragBuilder->codeAppend ("if (d == 0.0) {"); // if on the center of the circle |
- fragBuilder->codeAppendf(" %s = vec2(distanceToEdge, 0.0);", // avoid normalizing |
+ fragBuilder->codeAppendf(" %s = vec3(1.0, 0.0, distanceToEdge);", // no normalize |
args.fDistanceVectorName); |
fragBuilder->codeAppend ("} else {"); |
- fragBuilder->codeAppendf(" %s = normalize(%s.xy) * distanceToEdge;", |
+ fragBuilder->codeAppendf(" %s = vec3(normalize(%s.xy), distanceToEdge);", |
args.fDistanceVectorName, v.fsIn()); |
fragBuilder->codeAppend ("}"); |
} |