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

Unified Diff: src/gpu/glsl/GrGLSLProgramBuilder.cpp

Issue 2223053002: Split distance vector into direction and magnitude components (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 | « src/gpu/GrOvalRenderer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLProgramBuilder.cpp
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index 1f28f19bb99088054125c838ec037c267c39bc03..d0d813d4c2a3fbb61013ebdea5d2d0763d08cda9 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -90,8 +90,9 @@ void GrGLSLProgramBuilder::emitAndInstallPrimProc(const GrPrimitiveProcessor& pr
const char* distanceVectorName = nullptr;
if (this->fPipeline.usesDistanceVectorField() && proc.implementsDistanceVector()) {
distanceVectorName = fFS.distanceVectorName();
- fFS.codeAppend( "// Un-normalized vector to the closed geometric edge (in source space)\n");
- fFS.codeAppendf("vec2 %s;", distanceVectorName);
+ fFS.codeAppend( "// Normalized vector to the closest geometric edge (in source space)\n");
+ fFS.codeAppend( "// Distance to the edge encoded in the z-component\n");
+ fFS.codeAppendf("vec3 %s;", distanceVectorName);
}
// Enclose custom code in a block to avoid namespace conflicts
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698