aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/GrAlphaThresholdFragmentProcessor.fp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/GrAlphaThresholdFragmentProcessor.fp')
-rw-r--r--src/effects/GrAlphaThresholdFragmentProcessor.fp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.fp b/src/effects/GrAlphaThresholdFragmentProcessor.fp
index 481549e6b5..c3b3fbf5d5 100644
--- a/src/effects/GrAlphaThresholdFragmentProcessor.fp
+++ b/src/effects/GrAlphaThresholdFragmentProcessor.fp
@@ -1,8 +1,8 @@
in uniform sampler2D image;
in uniform colorSpaceXform colorXform;
in uniform sampler2D mask;
-in uniform float innerThreshold;
-in uniform float outerThreshold;
+in uniform half innerThreshold;
+in uniform half outerThreshold;
@class {
inline OptimizationFlags optFlags(float outerThreshold);
@@ -49,16 +49,16 @@ in uniform float outerThreshold;
}
void main() {
- float4 color = texture(image, sk_TransformedCoords2D[0], colorXform);
- float4 mask_color = texture(mask, sk_TransformedCoords2D[1]);
+ half4 color = texture(image, sk_TransformedCoords2D[0], colorXform);
+ half4 mask_color = texture(mask, sk_TransformedCoords2D[1]);
if (mask_color.a < 0.5) {
if (color.a > outerThreshold) {
- float scale = outerThreshold / color.a;
+ half scale = outerThreshold / color.a;
color.rgb *= scale;
color.a = outerThreshold;
}
} else if (color.a < innerThreshold) {
- float scale = innerThreshold / max(0.001, color.a);
+ half scale = innerThreshold / max(0.001, color.a);
color.rgb *= scale;
color.a = innerThreshold;
}