Index: src/gpu/effects/GrDitherEffect.cpp |
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp |
index e82b565b5ecc1a7bf23aa3c8bafbef41b8393540..7409e5ff7151818442b74ed68938d27ec38cd9b0 100644 |
--- a/src/gpu/effects/GrDitherEffect.cpp |
+++ b/src/gpu/effects/GrDitherEffect.cpp |
@@ -102,7 +102,7 @@ void GLDitherEffect::emitCode(GrGLShaderBuilder* builder, |
// For each channel c, add the random offset to the pixel to either bump |
// it up or let it remain constant during quantization. |
builder->fsCodeAppendf("\t\tfloat r = " |
- "fract(sin(dot(%s ,vec2(12.9898,78.233))) * 43758.5453);\n", |
+ "fract(sin(dot(%s.xy ,vec2(12.9898,78.233))) * 43758.5453);\n", |
builder->fragmentPosition()); |
builder->fsCodeAppendf("\t\t%s = (1.0/255.0) * vec4(r, r, r, r) + %s;\n", |
outputColor, GrGLSLExpr4(inputColor).c_str()); |