/external/skia/src/gpu/effects/ |
D | GrBezierEffect.cpp | 65 builder->fsCodeAppendf("\t\tvec3 dklmdx = dFdx(%s.xyz);\n", fsName); in emitCode() 66 builder->fsCodeAppendf("\t\tvec3 dklmdy = dFdy(%s.xyz);\n", fsName); in emitCode() 67 builder->fsCodeAppendf("\t\tfloat dfdx =\n" in emitCode() 70 builder->fsCodeAppendf("\t\tfloat dfdy =\n" in emitCode() 75 builder->fsCodeAppendf("\t\tfloat func = %s.x*%s.x - %s.y*%s.z;\n", fsName, fsName, in emitCode() 87 builder->fsCodeAppendf("\t\tvec3 dklmdx = dFdx(%s.xyz);\n", fsName); in emitCode() 88 builder->fsCodeAppendf("\t\tvec3 dklmdy = dFdy(%s.xyz);\n", fsName); in emitCode() 89 builder->fsCodeAppendf("\t\tfloat dfdx =\n" in emitCode() 92 builder->fsCodeAppendf("\t\tfloat dfdy =\n" in emitCode() 97 builder->fsCodeAppendf("\t\tfloat func = %s.x*%s.x - %s.y*%s.z;\n", fsName, fsName, in emitCode() [all …]
|
D | GrRRectEffect.cpp | 202 builder->fsCodeAppendf("\t\tvec2 dxy0 = %s.xy - %s;\n", rectName, fragmentPos); in emitCode() 203 builder->fsCodeAppendf("\t\tvec2 dxy1 = %s - %s.zw;\n", fragmentPos, rectName); in emitCode() 205 builder->fsCodeAppendf("\t\tfloat alpha = clamp(%s - length(dxy), 0.0, 1.0);\n", in emitCode() 209 builder->fsCodeAppendf("\t\tvec2 dxy = max(%s.xy - %s.xy, 0.0);\n", in emitCode() 211 builder->fsCodeAppendf("\t\tfloat rightAlpha = clamp(%s.z - %s.x, 0.0, 1.0);\n", in emitCode() 213 builder->fsCodeAppendf("\t\tfloat bottomAlpha = clamp(%s.w - %s.y, 0.0, 1.0);\n", in emitCode() 215 …builder->fsCodeAppendf("\t\tfloat alpha = bottomAlpha * rightAlpha * clamp(%s - length(dxy), 0.0, … in emitCode() 219 builder->fsCodeAppendf("\t\tvec2 dxy = max(vec2(%s.x - %s.z, %s.y - %s.y), 0.0);\n", in emitCode() 221 builder->fsCodeAppendf("\t\tfloat leftAlpha = clamp(%s.x - %s.x, 0.0, 1.0);\n", in emitCode() 223 builder->fsCodeAppendf("\t\tfloat bottomAlpha = clamp(%s.w - %s.y, 0.0, 1.0);\n", in emitCode() [all …]
|
D | GrConvexPolyEffect.cpp | 135 builder->fsCodeAppendf("\t\txSub = min(%s.x - %s.x, 0.0);\n", fragmentPos, rectName); in emitCode() 136 builder->fsCodeAppendf("\t\txSub += min(%s.z - %s.x, 0.0);\n", rectName, fragmentPos); in emitCode() 137 builder->fsCodeAppendf("\t\tySub = min(%s.y - %s.y, 0.0);\n", fragmentPos, rectName); in emitCode() 138 builder->fsCodeAppendf("\t\tySub += min(%s.w - %s.y, 0.0);\n", rectName, fragmentPos); in emitCode() 141 … builder->fsCodeAppendf("\t\tfloat alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));\n"); in emitCode() 143 builder->fsCodeAppendf("\t\tfloat alpha = 1.0;\n"); in emitCode() 144 … builder->fsCodeAppendf("\t\talpha *= (%s.x - %s.x) > -0.5 ? 1.0 : 0.0;\n", fragmentPos, rectName); in emitCode() 145 … builder->fsCodeAppendf("\t\talpha *= (%s.z - %s.x) > -0.5 ? 1.0 : 0.0;\n", rectName, fragmentPos); in emitCode() 146 … builder->fsCodeAppendf("\t\talpha *= (%s.y - %s.y) > -0.5 ? 1.0 : 0.0;\n", fragmentPos, rectName); in emitCode() 147 … builder->fsCodeAppendf("\t\talpha *= (%s.w - %s.y) > -0.5 ? 1.0 : 0.0;\n", rectName, fragmentPos); in emitCode() [all …]
|
D | GrDistanceFieldTextureEffect.cpp | 78 builder->fsCodeAppendf("\tvec2 uv = %s;\n", fsCoordName.c_str()); in emitCode() 79 builder->fsCodeAppendf("\tvec2 st = uv*%s;\n", textureSizeUniName); in emitCode() 116 builder->fsCodeAppendf("\tuv = vec2(val, %s);\n", luminanceUniName); in emitCode() 123 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, in emitCode() 285 builder->fsCodeAppendf("\tvec2 uv = %s;\n", fsCoordName.c_str()); in emitCode() 286 builder->fsCodeAppendf("\tvec2 st = uv*%s.xy;\n", textureSizeUniName); in emitCode() 289 builder->fsCodeAppendf("\tvec2 offset = vec2(dx*%s.z, 0.0);\n", textureSizeUniName); in emitCode() 293 builder->fsCodeAppendf("\tvec2 offset = %s.z*Jdx;\n", textureSizeUniName); in emitCode() 360 builder->fsCodeAppendf("\tuv = vec2(val.x, %s.x);\n", textColorUniName); in emitCode() 366 builder->fsCodeAppendf("\tuv = vec2(val.y, %s.y);\n", textColorUniName); in emitCode() [all …]
|
D | GrTextureDomain.cpp | 52 builder->fsCodeAppendf("\t%s = ", outColor); in sampleTexture() 74 builder->fsCodeAppendf("\t%s = ", outColor); in sampleTexture() 95 builder->fsCodeAppendf("\tfloat x = abs(2.0*(%s.x - %s.x)/(%s.z - %s.x) - 1.0);\n", in sampleTexture() 97 builder->fsCodeAppendf("\tfloat y = abs(2.0*(%s.y - %s.y)/(%s.w - %s.y) - 1.0);\n", in sampleTexture() 100 builder->fsCodeAppendf("\t%s = mix(inside, outside, blend);\n", outColor); in sampleTexture() 103 builder->fsCodeAppendf("\toutside.xy = lessThan(%s, %s.xy);\n", inCoords.c_str(), in sampleTexture() 105 builder->fsCodeAppendf("\toutside.zw = greaterThan(%s, %s.zw);\n", inCoords.c_str(), in sampleTexture() 107 builder->fsCodeAppendf("\t%s = any(outside) ? vec4(0.0, 0.0, 0.0, 0.0) : ", outColor); in sampleTexture()
|
D | GrConvolutionEffect.cpp | 74 builder->fsCodeAppendf("\t\t%s = vec4(0, 0, 0, 0);\n", outputColor); in emitCode() 80 builder->fsCodeAppendf("\t\tvec2 coord = %s - %d.0 * %s;\n", coords2D.c_str(), fRadius, imgInc); in emitCode() 88 builder->fsCodeAppendf("\t\t%s += ", outputColor); in emitCode() 93 builder->fsCodeAppendf(" * float(coord.%s >= %s.x && coord.%s <= %s.y)", in emitCode() 96 builder->fsCodeAppendf(" * %s;\n", kernelIndex.c_str()); in emitCode() 97 builder->fsCodeAppendf("\t\tcoord += %s;\n", imgInc); in emitCode()
|
D | GrOvalEffect.cpp | 150 builder->fsCodeAppendf("\t\tfloat d = length(%s.xy - %s) - %s.z;\n", in emitCode() 153 builder->fsCodeAppendf("\t\tfloat d = %s.z - length(%s - %s.xy);\n", in emitCode() 162 builder->fsCodeAppendf("\t\t%s = %s;\n", outputColor, in emitCode() 321 builder->fsCodeAppendf("\t\tvec2 d = %s - %s.xy;\n", fragmentPos, ellipseName); in emitCode() 322 builder->fsCodeAppendf("\t\tvec2 Z = d * %s.zw;\n", ellipseName); in emitCode() 326 builder->fsCodeAppendf("\t\tfloat grad_dot = 4.0 * dot(Z, Z);\n"); in emitCode() 329 builder->fsCodeAppendf("\t\tfloat approx_dist = implicit * inversesqrt(grad_dot);\n"); in emitCode() 348 builder->fsCodeAppendf("\t\t%s = %s;\n", outputColor, in emitCode()
|
D | GrConfigConversionEffect.cpp | 32 builder->fsCodeAppendf("\t\t%s = ", outputColor); in emitCode() 37 builder->fsCodeAppendf("\t%s = %s.bgra;\n", outputColor, outputColor); in emitCode() 42 builder->fsCodeAppendf( in emitCode() 51 builder->fsCodeAppendf( in emitCode() 56 …builder->fsCodeAppendf("\t\t%s = %s.a <= 0.0 ? vec4(0,0,0,0) : vec4(ceil(%s.%s / %s.a * 255.0) / 2… in emitCode() 60 …builder->fsCodeAppendf("\t\t%s = %s.a <= 0.0 ? vec4(0,0,0,0) : vec4(floor(%s.%s / %s.a * 255.0) / … in emitCode()
|
D | GrBicubicEffect.cpp | 83 builder->fsCodeAppendf("\tvec2 coord = %s - %s * vec2(0.5);\n", coords2D.c_str(), imgInc); in emitCode() 88 builder->fsCodeAppendf("\tcoord /= %s;\n", imgInc); in emitCode() 90 builder->fsCodeAppendf("\tcoord = (coord - f + vec2(0.5)) * %s;\n", imgInc); in emitCode() 100 …builder->fsCodeAppendf("\tvec4 s%d = %s(%s, f.x, rowColors[0], rowColors[1], rowColors[2], rowColo… in emitCode() 104 …builder->fsCodeAppendf("\t%s = %s;\n", outputColor, (GrGLSLExpr4(bicubicColor.c_str()) * GrGLSLExp… in emitCode()
|
D | GrDashingEffect.cpp | 516 builder->fsCodeAppendf("\t\tfloat xShifted = %s.x - floor(%s.x / %s) * %s;\n", in emitCode() 518 builder->fsCodeAppendf("\t\tvec2 fragPosShifted = vec2(xShifted, %s.y);\n", fsCoordName); in emitCode() 523 builder->fsCodeAppendf("\t\txSub = min(fragPosShifted.x - %s.x, 0.0);\n", rectName); in emitCode() 524 builder->fsCodeAppendf("\t\txSub += min(%s.z - fragPosShifted.x, 0.0);\n", rectName); in emitCode() 525 builder->fsCodeAppendf("\t\tySub = min(fragPosShifted.y - %s.y, 0.0);\n", rectName); in emitCode() 526 builder->fsCodeAppendf("\t\tySub += min(%s.w - fragPosShifted.y, 0.0);\n", rectName); in emitCode() 529 … builder->fsCodeAppendf("\t\tfloat alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));\n"); in emitCode() 532 builder->fsCodeAppendf("\t\tfloat alpha = 1.0;\n"); in emitCode() 533 … builder->fsCodeAppendf("\t\talpha *= (fragPosShifted.x - %s.x) > -0.5 ? 1.0 : 0.0;\n", rectName); in emitCode() 534 … builder->fsCodeAppendf("\t\talpha *= (%s.z - fragPosShifted.x) >= -0.5 ? 1.0 : 0.0;\n", rectName); in emitCode() [all …]
|
D | GrDitherEffect.cpp | 104 builder->fsCodeAppendf("\t\tfloat r = " in emitCode() 107 builder->fsCodeAppendf("\t\t%s = (1.0/255.0) * vec4(r, r, r, r) + %s;\n", in emitCode()
|
/external/skia/src/effects/ |
D | SkBlurMaskFilter.cpp | 633 builder->fsCodeAppendf("\tfloat %s;\n", output); in OutputRectBlurProfileLookup() 634 builder->fsCodeAppendf("\t\t{\n"); in OutputRectBlurProfileLookup() 635 builder->fsCodeAppendf("\t\t\tfloat coord = (0.5 * (abs(2.0*%s - %s) - %s))/%s;\n", in OutputRectBlurProfileLookup() 637 builder->fsCodeAppendf("\t\t\t%s = ", output); in OutputRectBlurProfileLookup() 640 builder->fsCodeAppendf("\t\t}\n"); in OutputRectBlurProfileLookup() 666 builder->fsCodeAppendf("\tvec4 src=%s;\n", inputColor); in emitCode() 668 builder->fsCodeAppendf("\tvec4 src=vec4(1)\n;"); in emitCode() 671 builder->fsCodeAppendf("\tvec2 translatedPos = %s.xy - %s.xy;\n", fragmentPos, rectName ); in emitCode() 672 builder->fsCodeAppendf("\tfloat width = %s.z - %s.x;\n", rectName, rectName); in emitCode() 673 builder->fsCodeAppendf("\tfloat height = %s.w - %s.y;\n", rectName, rectName); in emitCode() [all …]
|
D | SkTableColorFilter.cpp | 305 builder->fsCodeAppendf("\t\tvec4 coord = vec4(%f, %f, %f, %f);\n", in emitCode() 309 builder->fsCodeAppendf("\t\tfloat nonZeroAlpha = max(%s.a, .0001);\n", inputColor); in emitCode() 310 …builder->fsCodeAppendf("\t\tvec4 coord = vec4(%s.rgb / nonZeroAlpha, nonZeroAlpha);\n", inputColor… in emitCode() 311 builder->fsCodeAppendf("\t\tcoord = coord * %f + vec4(%f, %f, %f, %f);\n", in emitCode() 317 builder->fsCodeAppendf("\t\t%s.a = ", outputColor); in emitCode() 321 builder->fsCodeAppendf("\t\t%s.r = ", outputColor); in emitCode() 325 builder->fsCodeAppendf("\t\t%s.g = ", outputColor); in emitCode() 329 builder->fsCodeAppendf("\t\t%s.b = ", outputColor); in emitCode() 333 builder->fsCodeAppendf("\t\t%s.rgb *= %s.a;\n", outputColor, outputColor); in emitCode()
|
D | SkArithmeticMode.cpp | 364 builder->fsCodeAppendf(";\n"); in emitCode() 377 builder->fsCodeAppendf("\t\tconst vec4 src = vec4(1);\n"); in emitCode() 379 builder->fsCodeAppendf("\t\tvec4 src = %s;\n", inputColor); in emitCode() 381 builder->fsCodeAppendf("\t\tsrc.rgb = clamp(src.rgb / src.a, 0.0, 1.0);\n"); in emitCode() 385 builder->fsCodeAppendf("\t\tvec4 dst = %s;\n", dstColor); in emitCode() 387 builder->fsCodeAppendf("\t\tdst.rgb = clamp(dst.rgb / dst.a, 0.0, 1.0);\n"); in emitCode() 390 …builder->fsCodeAppendf("\t\t%s = %s.x * src * dst + %s.y * src + %s.z * dst + %s.w;\n", outputColo… in emitCode() 391 builder->fsCodeAppendf("\t\t%s = clamp(%s, 0.0, 1.0);\n", outputColor, outputColor); in emitCode() 393 builder->fsCodeAppendf("\t\t%s.rgb *= %s.a;\n", outputColor, outputColor); in emitCode() 395 …builder->fsCodeAppendf("\t\t%s.rgb = min(%s.rgb, %s.a);\n", outputColor, outputColor, outputColor); in emitCode()
|
D | SkPerlinNoiseShader.cpp | 844 builder->fsCodeAppendf("\n\t\tvec2 %s = floor((%s * vec3(%s, 1.0)).xy) * %s;", in emitCode() 848 builder->fsCodeAppendf("\n\t\t%s = vec4(0.0);", outputColor); in emitCode() 852 builder->fsCodeAppendf("\n\t\tvec2 %s = %s;", stitchData, stitchDataUni); in emitCode() 855 builder->fsCodeAppendf("\n\t\tfloat %s = 1.0;", ratio); in emitCode() 858 builder->fsCodeAppendf("\n\t\tfor (int octave = 0; octave < %d; ++octave) {", fNumOctaves); in emitCode() 860 builder->fsCodeAppendf("\n\t\t\t%s += ", outputColor); in emitCode() 865 builder->fsCodeAppendf( in emitCode() 873 builder->fsCodeAppendf( in emitCode() 882 builder->fsCodeAppendf(")"); // end of "abs(" in emitCode() 884 builder->fsCodeAppendf(" * %s;", ratio); in emitCode() [all …]
|
D | SkMatrixConvolutionImageFilter.cpp | 460 …builder->fsCodeAppendf("clamp(%s, %s.xy, %s.zw) != %s ? vec4(0, 0, 0, 0) : ", coord, bounds, bound… in appendTextureLookup() 500 …builder->fsCodeAppendf("\t\tvec2 coord = %s - %s * %s;\n", coords2D.c_str(), kernelOffset, imgInc); in emitCode() 501 builder->fsCodeAppendf("\t\tfor (int y = 0; y < %d; y++) {\n", kHeight); in emitCode() 502 builder->fsCodeAppendf("\t\t\tfor (int x = 0; x < %d; x++) {\n", kWidth); in emitCode() 503 builder->fsCodeAppendf("\t\t\t\tfloat k = %s[y * %d + x];\n", kernel, kWidth); in emitCode() 504 builder->fsCodeAppendf("\t\t\t\tvec2 coord2 = coord + vec2(x, y) * %s;\n", imgInc); in emitCode() 515 builder->fsCodeAppendf("\t\t%s = sum * %s + %s;\n", outputColor, gain, bias); in emitCode() 516 builder->fsCodeAppendf("\t\t%s.rgb = clamp(%s.rgb, 0.0, %s.a);\n", in emitCode() 522 builder->fsCodeAppendf("\t\t%s.a = c.a;\n", outputColor); in emitCode() 523 builder->fsCodeAppendf("\t\t%s.rgb = sum.rgb * %s + %s;\n", outputColor, gain, bias); in emitCode() [all …]
|
D | SkAlphaThresholdFilter.cpp | 155 builder->fsCodeAppendf("\t\tvec2 coord = %s;\n", coords2D.c_str()); in emitCode() 156 builder->fsCodeAppendf("\t\tvec2 mask_coord = %s;\n", maskCoords2D.c_str()); in emitCode() 164 builder->fsCodeAppendf("\t\tfloat inner_thresh = %s;\n", in emitCode() 166 builder->fsCodeAppendf("\t\tfloat outer_thresh = %s;\n", in emitCode() 183 builder->fsCodeAppendf("%s = %s;\n", outputColor, in emitCode()
|
D | SkLumaColorFilter.cpp | 104 builder->fsCodeAppendf("\tfloat luma = dot(vec3(%f, %f, %f), %s.rgb);\n", in emitCode() 109 builder->fsCodeAppendf("\t%s = vec4(0, 0, 0, luma);\n", in emitCode()
|
D | SkMagnifierImageFilter.cpp | 141 builder->fsCodeAppendf("\t\tvec2 coord = %s;\n", coords2D.c_str()); in emitCode() 142 builder->fsCodeAppendf("\t\tvec2 zoom_coord = %s + %s * %s;\n", in emitCode() 149 builder->fsCodeAppendf("\t\tdelta = delta * %s;\n", builder->getUniformCStr(fInvInsetVar)); in emitCode() 167 builder->fsCodeAppendf("\t\t%s = output_color;", outputColor); in emitCode()
|
/external/skia/src/core/ |
D | SkXfermode.cpp | 836 builder->fsCodeAppendf("\t\tvec4 %s = ", dstColor); in emitCode() 838 builder->fsCodeAppendf(";\n"); in emitCode() 846 builder->fsCodeAppendf("\t\tconst vec4 ones = vec4(1);\n"); in emitCode() 849 builder->fsCodeAppendf("\t\t// SkXfermode::Mode: %s\n", SkXfermode::ModeName(mode)); in emitCode() 852 builder->fsCodeAppendf("\t\t%s.a = %s.a + (1.0 - %s.a) * %s.a;\n", in emitCode() 861 builder->fsCodeAppendf("\t\t%s.rgb = min((1.0 - %s.a) * %s.rgb + %s.rgb, " in emitCode() 868 builder->fsCodeAppendf("\t\t%s.rgb = max((1.0 - %s.a) * %s.rgb + %s.rgb, " in emitCode() 888 builder->fsCodeAppendf("\t\tif (0.0 == %s.a) {\n", dstColor); in emitCode() 889 builder->fsCodeAppendf("\t\t\t%s.rgba = %s;\n", outputColor, inputColor); in emitCode() 890 builder->fsCodeAppendf("\t\t} else {\n"); in emitCode() [all …]
|
/external/skia/src/effects/gradients/ |
D | SkTwoPointConicalGradient_gpu.cpp | 246 builder->fsCodeAppendf("\tvec3 interpolants = vec3(%s.xy / %s.z, %s.x / %s.z);\n", in emitCode() 257 builder->fsCodeAppendf("\t%s = vec4(0.0,0.0,0.0,0.0);\n", outputColor); in emitCode() 260 builder->fsCodeAppendf("\tfloat %s = dot(%s, %s) - %s;\n", in emitCode() 264 builder->fsCodeAppendf("\tfloat %s = -(%s / %s);\n", tName.c_str(), in emitCode() 268 builder->fsCodeAppendf("\tif (%s * %s + %s > 0.0) {\n", tName.c_str(), in emitCode() 521 builder->fsCodeAppendf("\t%s = vec4(0.0,0.0,0.0,0.0);\n", outputColor); in emitCode() 523 builder->fsCodeAppendf("\tfloat xs = %s.x * %s.x;\n", coords2D, coords2D); in emitCode() 524 builder->fsCodeAppendf("\tfloat ys = %s.y * %s.y;\n", coords2D, coords2D); in emitCode() 525 builder->fsCodeAppendf("\tfloat d = xs + %s * ys;\n", p1.c_str()); in emitCode() 530 builder->fsCodeAppendf("\tfloat %s = %s.x * %s + sqrt(d);\n", tName.c_str(), in emitCode() [all …]
|
D | SkGradientShader.cpp | 973 builder->fsCodeAppendf("\tvec4 colorTemp = mix(%s, %s, clamp(%s, 0.0, 1.0));\n", in emitColor() 986 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, in emitColor() 989 builder->fsCodeAppendf("\tfloat oneMinus2t = 1.0 - (2.0 * (%s));\n", in emitColor() 991 builder->fsCodeAppendf("\tvec4 colorTemp = clamp(oneMinus2t, 0.0, 1.0) * %s;\n", in emitColor() 998 builder->fsCodeAppendf("\tcolorTemp += (1.0 - minAbs) * %s;\n", in emitColor() 1001 builder->fsCodeAppendf("\tcolorTemp += (1.0 - min(abs(oneMinus2t), 1.0)) * %s;\n", in emitColor() 1004 builder->fsCodeAppendf("\tcolorTemp += clamp(-oneMinus2t, 0.0, 1.0) * %s;\n", in emitColor() 1010 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, in emitColor() 1013 builder->fsCodeAppendf("\tvec2 coord = vec2(%s, %s);\n", in emitColor() 1016 builder->fsCodeAppendf("\t%s = ", outputColor); in emitColor()
|
/external/skia/src/gpu/ |
D | GrAARectRenderer.cpp | 63 builder->fsCodeAppendf("\tfloat insetW = min(1.0, %s.z) - 0.5;\n", fsRectName); in emitCode() 64 builder->fsCodeAppendf("\tfloat insetH = min(1.0, %s.w) - 0.5;\n", fsRectName); in emitCode() 77 builder->fsCodeAppendf( in emitCode() 81 builder->fsCodeAppendf( in emitCode() 86 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, in emitCode() 189 builder->fsCodeAppendf("\tfloat insetW = min(1.0, %s.x) - 0.5;\n", fsWidthHeightName); in emitCode() 190 builder->fsCodeAppendf("\tfloat insetH = min(1.0, %s.y) - 0.5;\n", fsWidthHeightName); in emitCode() 203 builder->fsCodeAppendf("\tvec2 offset = %s - %s.xy;\n", in emitCode() 205 builder->fsCodeAppendf("\tfloat perpDot = abs(offset.x * %s.w - offset.y * %s.z);\n", in emitCode() 207 builder->fsCodeAppendf( in emitCode() [all …]
|
D | GrOvalRenderer.cpp | 112 builder->fsCodeAppendf("\tfloat d = length(%s.xy);\n", fsName); in emitCode() 113 builder->fsCodeAppendf("\tfloat edgeAlpha = clamp(%s.z - d, 0.0, 1.0);\n", fsName); in emitCode() 115 builder->fsCodeAppendf("\tfloat innerAlpha = clamp(d - %s.w, 0.0, 1.0);\n", fsName); in emitCode() 119 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, in emitCode() 231 builder->fsCodeAppendf("\tvec2 scaledOffset = %s*%s.xy;\n", fsOffsetName, fsRadiiName); in emitCode() 233 builder->fsCodeAppendf("\tvec2 grad = 2.0*scaledOffset*%s.xy;\n", fsRadiiName); in emitCode() 242 builder->fsCodeAppendf("\tscaledOffset = %s*%s.zw;\n", fsOffsetName, fsRadiiName); in emitCode() 244 builder->fsCodeAppendf("\tgrad = 2.0*scaledOffset*%s.zw;\n", fsRadiiName); in emitCode() 249 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, in emitCode() 372 builder->fsCodeAppendf("\tvec2 scaledOffset = %s.xy;\n", fsOffsetName0); in emitCode() [all …]
|
D | GrAAConvexPathRenderer.cpp | 543 builder->fsCodeAppendf("\t\tfloat edgeAlpha;\n"); in emitCode() 550 builder->fsCodeAppendf("\t\tvec2 duvdx = dFdx(%s.xy);\n", fsName); in emitCode() 551 builder->fsCodeAppendf("\t\tvec2 duvdy = dFdy(%s.xy);\n", fsName); in emitCode() 552 builder->fsCodeAppendf("\t\tif (%s.z > 0.0 && %s.w > 0.0) {\n", fsName, fsName); in emitCode() 554 builder->fsCodeAppendf("\t\t\tedgeAlpha = min(min(%s.z, %s.w) + 0.5, 1.0);\n", fsName, in emitCode() 556 builder->fsCodeAppendf ("\t\t} else {\n"); in emitCode() 557 builder->fsCodeAppendf("\t\t\tvec2 gF = vec2(2.0*%s.x*duvdx.x - duvdx.y,\n" in emitCode() 560 builder->fsCodeAppendf("\t\t\tedgeAlpha = (%s.x*%s.x - %s.y);\n", fsName, fsName, in emitCode() 562 builder->fsCodeAppendf("\t\t\tedgeAlpha = " in emitCode() 566 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, in emitCode()
|