diff options
Diffstat (limited to 'src/gpu/effects/GrDitherEffect.cpp')
-rw-r--r-- | src/gpu/effects/GrDitherEffect.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp index eb7fe6280a..a93e74f412 100644 --- a/src/gpu/effects/GrDitherEffect.cpp +++ b/src/gpu/effects/GrDitherEffect.cpp @@ -28,7 +28,6 @@ public: private: DitherEffect() { this->initClassID<DitherEffect>(); - this->setWillReadFragmentPosition(); } GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; @@ -79,8 +78,8 @@ void GLDitherEffect::emitCode(EmitArgs& args) { // For each channel c, add the random offset to the pixel to either bump // it up or let it remain constant during quantization. fragBuilder->codeAppendf("\t\tfloat r = " - "fract(sin(dot(%s.xy ,vec2(12.9898,78.233))) * 43758.5453);\n", - fragBuilder->fragmentPosition()); + "fract(sin(dot(sk_FragCoord.xy, vec2(12.9898,78.233))) * " + "43758.5453);\n"); fragBuilder->codeAppendf("\t\t%s = (1.0/255.0) * vec4(r, r, r, r) + %s;\n", args.fOutputColor, GrGLSLExpr4(args.fInputColor).c_str()); } |