Index: src/gpu/effects/GrCustomCoordsTextureEffect.cpp |
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp |
index afa075460386b71531ecc2bb35b659b0a4de571f..77e799414aed9702b5d6de8232df39dfc7d26f85 100644 |
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp |
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp |
@@ -31,6 +31,10 @@ public: |
const GrShaderVar& inTextureCoords = customCoordsTextureEffect.inTextureCoords(); |
vsBuilder->codeAppendf("%s = %s;", v.vsOut(), inTextureCoords.c_str()); |
+ // setup position varying |
+ vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), |
+ vsBuilder->uViewM(), vsBuilder->inPosition()); |
+ |
GrGLGPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
fsBuilder->codeAppendf("%s = ", args.fOutput); |
fsBuilder->appendTextureLookupAndModulate(args.fInput, |