/third_party/flutter/skia/src/effects/ |
D | SkHighContrastFilter.cpp | 246 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 248 fragBuilder->codeAppendf("half4 color = %s;", args.fInputColor); in emitCode() 251 fragBuilder->codeAppendf("half nonZeroAlpha = max(color.a, 0.0001);"); in emitCode() 252 fragBuilder->codeAppendf("color = half4(color.rgb / nonZeroAlpha, nonZeroAlpha);"); in emitCode() 255 fragBuilder->codeAppend("color.rgb = color.rgb * color.rgb;"); in emitCode() 260 fragBuilder->codeAppendf("half luma = dot(color, half4(%f, %f, %f, 0));", in emitCode() 262 fragBuilder->codeAppendf("color = half4(luma, luma, luma, 0);"); in emitCode() 266 fragBuilder->codeAppendf("color = half4(1, 1, 1, 1) - color;"); in emitCode() 271 fragBuilder->codeAppendf("half fmax = max(color.r, max(color.g, color.b));"); in emitCode() 272 fragBuilder->codeAppendf("half fmin = min(color.r, min(color.g, color.b));"); in emitCode() [all …]
|
D | SkTableColorFilter.cpp | 296 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 300 fragBuilder->codeAppendf("\t\thalf4 coord = half4(%f, %f, %f, %f);\n", in emitCode() 304 fragBuilder->codeAppendf("\t\thalf nonZeroAlpha = max(%s.a, .0001);\n", args.fInputColor); in emitCode() 305 fragBuilder->codeAppendf("\t\thalf4 coord = half4(%s.rgb / nonZeroAlpha, nonZeroAlpha);\n", in emitCode() 307 fragBuilder->codeAppendf("\t\tcoord = coord * %f + half4(%f, %f, %f, %f);\n", in emitCode() 315 fragBuilder->codeAppendf("\t\t%s.a = ", args.fOutputColor); in emitCode() 317 fragBuilder->appendTextureLookup(args.fTexSamplers[0], coord.c_str()); in emitCode() 318 fragBuilder->codeAppend(".a;\n"); in emitCode() 320 fragBuilder->codeAppendf("\t\t%s.r = ", args.fOutputColor); in emitCode() 322 fragBuilder->appendTextureLookup(args.fTexSamplers[0], coord.c_str()); in emitCode() [all …]
|
/third_party/skia/src/gpu/effects/ |
D | GrDistanceFieldGeoProc.cpp | 54 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in onEmitCode() local 79 fragBuilder->codeAppendf("half4 %s;\n", args.fOutputColor); in onEmitCode() 110 fragBuilder->codeAppendf("float2 uv = %s;\n", uv.fsIn()); in onEmitCode() 111 fragBuilder->codeAppend("half4 texColor;"); in onEmitCode() 115 fragBuilder->codeAppend("half distance = " in onEmitCode() 119 fragBuilder->codeAppendf("distance -= %s;", distanceAdjustUniName); in onEmitCode() 122 fragBuilder->codeAppend("half afwidth;"); in onEmitCode() 130 fragBuilder->codeAppendf( in onEmitCode() 133 fragBuilder->codeAppendf( in onEmitCode() 144 fragBuilder->codeAppendf("half st_grad_len = length(half2(dFdy(%s)));", st.fsIn()); in onEmitCode() [all …]
|
D | GrBezierEffect.cpp | 64 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in onEmitCode() local 66 fragBuilder->codeAppendf("half4 %s;", args.fOutputColor); in onEmitCode() 67 this->setupUniformColor(fragBuilder, uniformHandler, args.fOutputColor, &fColorUniform); in onEmitCode() 100 fragBuilder->declAppend(edgeAlpha); in onEmitCode() 101 fragBuilder->declAppend(dklmdx); in onEmitCode() 102 fragBuilder->declAppend(dklmdy); in onEmitCode() 103 fragBuilder->declAppend(dfdx); in onEmitCode() 104 fragBuilder->declAppend(dfdy); in onEmitCode() 105 fragBuilder->declAppend(gF); in onEmitCode() 106 fragBuilder->declAppend(gFM); in onEmitCode() [all …]
|
D | GrRRectEffect.cpp | 180 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 198 fragBuilder->codeAppendf("float2 dxy0 = %s.LT - sk_FragCoord.xy;", rectName); in emitCode() 199 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.RB;", rectName); in emitCode() 200 fragBuilder->codeAppend("float2 dxy = max(max(dxy0, dxy1), 0.0);"); in emitCode() 201 fragBuilder->codeAppendf("half alpha = half(%s);", clampedCircleDistance.c_str()); in emitCode() 204 fragBuilder->codeAppendf("float2 dxy = max(%s.LT - sk_FragCoord.xy, 0.0);", in emitCode() 206 fragBuilder->codeAppendf("half rightAlpha = half(saturate(%s.R - sk_FragCoord.x));", in emitCode() 208 fragBuilder->codeAppendf("half bottomAlpha = half(saturate(%s.B - sk_FragCoord.y));", in emitCode() 210 fragBuilder->codeAppendf("half alpha = bottomAlpha * rightAlpha * half(%s);", in emitCode() 214 fragBuilder->codeAppendf("float2 dxy = max(float2(sk_FragCoord.x - %s.R, " in emitCode() [all …]
|
D | GrShadowGeoProc.cpp | 27 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in onEmitCode() local 31 fragBuilder->codeAppend("half3 shadowParams;"); in onEmitCode() 36 fragBuilder->codeAppendf("half4 %s;", args.fOutputColor); in onEmitCode() 43 fragBuilder->codeAppend("half d = length(shadowParams.xy);"); in onEmitCode() 44 fragBuilder->codeAppend("float2 uv = float2(shadowParams.z * (1.0 - d), 0.5);"); in onEmitCode() 45 fragBuilder->codeAppend("half factor = "); in onEmitCode() 46 fragBuilder->appendTextureLookup(args.fTexSamplers[0], "uv"); in onEmitCode() 47 fragBuilder->codeAppend(".a;"); in onEmitCode() 48 fragBuilder->codeAppendf("half4 %s = half4(factor);", args.fOutputCoverage); in onEmitCode()
|
D | GrMatrixConvolutionEffect.cpp | 161 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitKernelBlock() local 168 fragBuilder->codeAppendf("for (int i = 0; i < %d; ++i)", (int)kernelArea); in emitKernelBlock() 171 GrGLSLShaderBuilder::ShaderBlock block(fragBuilder); in emitKernelBlock() 173 fragBuilder->codeAppend("half k;"); in emitKernelBlock() 174 fragBuilder->codeAppend("half2 sourceOffset;"); in emitKernelBlock() 178 fragBuilder->codeAppendf("k = %s.w + %s;", kernelSample.c_str(), kernelBias); in emitKernelBlock() 179 fragBuilder->codeAppendf("sourceOffset.y = floor(half(i) / %d);", kernelWidth); in emitKernelBlock() 180 fragBuilder->codeAppendf("sourceOffset.x = half(i) - sourceOffset.y * %d;", kernelWidth); in emitKernelBlock() 182 fragBuilder->codeAppendf("sourceOffset = half2(%d, %d);", loc.x(), loc.y()); in emitKernelBlock() 185 fragBuilder->codeAppendf("k = %s[%d][%d];", kernel, offset / 4, offset & 0x3); in emitKernelBlock() [all …]
|
D | GrBicubicEffect.cpp | 33 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 44 fragBuilder->codeAppendf("float2 coord = %s - float2(0.5);", args.fSampleCoord); in emitCode() 45 fragBuilder->codeAppend("half2 f = half2(fract(coord));"); in emitCode() 46 fragBuilder->codeAppend("coord += 0.5 - f;"); in emitCode() 47 fragBuilder->codeAppendf("half4 wx = %s * half4(1.0, f.x, f.x * f.x, f.x * f.x * f.x);", in emitCode() 49 fragBuilder->codeAppendf("half4 wy = %s * half4(1.0, f.y, f.y * f.y, f.y * f.y * f.y);", in emitCode() 51 fragBuilder->codeAppend("half4 rowColors[4];"); in emitCode() 58 fragBuilder->codeAppendf("rowColors[%d] = %s;", x, childStr.c_str()); in emitCode() 60 fragBuilder->codeAppendf( in emitCode() 65 fragBuilder->codeAppend( in emitCode() [all …]
|
/third_party/flutter/skia/src/gpu/effects/ |
D | GrDistanceFieldGeoProc.cpp | 32 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in onEmitCode() local 85 fragBuilder->codeAppendf("float2 uv = %s;\n", uv.fsIn()); in onEmitCode() 86 fragBuilder->codeAppend("half4 texColor;"); in onEmitCode() 90 fragBuilder->codeAppend("half distance = " in onEmitCode() 94 fragBuilder->codeAppendf("distance -= %s;", distanceAdjustUniName); in onEmitCode() 97 fragBuilder->codeAppend("half afwidth;"); in onEmitCode() 105 fragBuilder->codeAppendf("afwidth = abs(" SK_DistanceFieldAAFactor in onEmitCode() 109 fragBuilder->codeAppendf("afwidth = abs(" SK_DistanceFieldAAFactor in onEmitCode() 120 fragBuilder->codeAppendf("half st_grad_len = length(half2(dFdx(%s)));", st.fsIn()); in onEmitCode() 123 fragBuilder->codeAppendf("half st_grad_len = length(half2(dFdy(%s)));", st.fsIn()); in onEmitCode() [all …]
|
D | GrBezierEffect.cpp | 82 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in onEmitCode() local 84 this->setupUniformColor(fragBuilder, uniformHandler, args.fOutputColor, &fColorUniform); in onEmitCode() 115 fragBuilder->declAppend(edgeAlpha); in onEmitCode() 116 fragBuilder->declAppend(dklmdx); in onEmitCode() 117 fragBuilder->declAppend(dklmdy); in onEmitCode() 118 fragBuilder->declAppend(dfdx); in onEmitCode() 119 fragBuilder->declAppend(dfdy); in onEmitCode() 120 fragBuilder->declAppend(gF); in onEmitCode() 121 fragBuilder->declAppend(gFM); in onEmitCode() 122 fragBuilder->declAppend(func); in onEmitCode() [all …]
|
D | GrRRectEffect.cpp | 175 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 193 fragBuilder->codeAppendf("float2 dxy0 = %s.xy - sk_FragCoord.xy;", rectName); in emitCode() 194 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.zw;", rectName); in emitCode() 195 fragBuilder->codeAppend("float2 dxy = max(max(dxy0, dxy1), 0.0);"); in emitCode() 196 fragBuilder->codeAppendf("half alpha = half(%s);", clampedCircleDistance.c_str()); in emitCode() 199 fragBuilder->codeAppendf("float2 dxy = max(%s.xy - sk_FragCoord.xy, 0.0);", in emitCode() 201 fragBuilder->codeAppendf("half rightAlpha = half(saturate(%s.z - sk_FragCoord.x));", in emitCode() 203 fragBuilder->codeAppendf("half bottomAlpha = half(saturate(%s.w - sk_FragCoord.y));", in emitCode() 205 fragBuilder->codeAppendf("half alpha = bottomAlpha * rightAlpha * half(%s);", in emitCode() 209 fragBuilder->codeAppendf("float2 dxy = max(float2(sk_FragCoord.x - %s.z, " in emitCode() [all …]
|
D | GrBicubicEffect.cpp | 48 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 49 SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]); in emitCode() 69 fragBuilder->codeAppend("half4x4 kMitchellCoefficients = half4x4(" in emitCode() 74 fragBuilder->codeAppendf("float2 coord = %s - %s.xy * float2(0.5);", coords2D.c_str(), dims); in emitCode() 79 fragBuilder->codeAppendf("half2 f = half2(fract(coord * %s.zw));", dims); in emitCode() 80 fragBuilder->codeAppendf("coord = coord + (half2(0.5) - f) * %s.xy;", dims); in emitCode() 82 fragBuilder->codeAppend( in emitCode() 84 fragBuilder->codeAppend( in emitCode() 86 fragBuilder->codeAppend("half4 rowColors[4];"); in emitCode() 93 fDomain.sampleTexture(fragBuilder, in emitCode() [all …]
|
D | GrShadowGeoProc.cpp | 25 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in onEmitCode() local 29 fragBuilder->codeAppend("half3 shadowParams;"); in onEmitCode() 45 fragBuilder->codeAppend("half d = length(shadowParams.xy);"); in onEmitCode() 46 fragBuilder->codeAppend("half distance = shadowParams.z * (1.0 - d);"); in onEmitCode() 48 fragBuilder->codeAppend("half factor = 1.0 - clamp(distance, 0.0, 1.0);"); in onEmitCode() 49 fragBuilder->codeAppend("factor = exp(-factor * factor * 4.0) - 0.018;"); in onEmitCode() 50 fragBuilder->codeAppendf("%s = half4(factor);", in onEmitCode()
|
D | GrSRGBEffect.cpp | 19 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 27 fragBuilder->emitFunction(kHalf_GrSLType, in emitCode() 36 fragBuilder->emitFunction(kHalf_GrSLType, in emitCode() 48 fragBuilder->codeAppendf("float4 color = %s;", args.fInputColor); in emitCode() 50 fragBuilder->codeAppendf("float nonZeroAlpha = max(color.a, 0.0001);"); in emitCode() 51 fragBuilder->codeAppendf("color = float4(color.rgb / nonZeroAlpha, color.a);"); in emitCode() 53 fragBuilder->codeAppendf("color = float4(%s(half(color.r)), %s(half(color.g)), " in emitCode() 59 fragBuilder->codeAppendf("color = float4(color.rgb, 1) * color.a;"); in emitCode() 61 fragBuilder->codeAppendf("%s = half4(color);", args.fOutputColor); in emitCode()
|
D | GrGaussianConvolutionFragmentProcessor.cpp | 58 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 59 SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]); in emitCode() 61 fragBuilder->codeAppendf("%s = half4(0, 0, 0, 0);", args.fOutputColor); in emitCode() 66 … fragBuilder->codeAppendf("float2 coord = %s - %d.0 * %s;", coords2D.c_str(), ce.radius(), imgInc); in emitCode() 67 fragBuilder->codeAppend("float2 coordSampled = half2(0, 0);"); in emitCode() 78 fragBuilder->codeAppend("coordSampled = coord;"); in emitCode() 88 fragBuilder->codeAppendf("coordSampled.%s = clamp(coord.%s, %s.x, %s.y);\n", in emitCode() 93 fragBuilder->codeAppendf("coordSampled.%s = " in emitCode() 99 fragBuilder->codeAppendf("if (coord.%s >= %s.x && coord.%s <= %s.y) {", in emitCode() 108 fragBuilder->codeAppendf("%s += ", args.fOutputColor); in emitCode() [all …]
|
D | GrMatrixConvolutionEffect.cpp | 65 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 66 SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]); in emitCode() 67 fragBuilder->codeAppend("half4 sum = half4(0, 0, 0, 0);"); in emitCode() 68 … fragBuilder->codeAppendf("float2 coord = %s - %s * %s;", coords2D.c_str(), kernelOffset, imgInc); in emitCode() 69 fragBuilder->codeAppend("half4 c;"); in emitCode() 74 GrGLSLShaderBuilder::ShaderBlock block(fragBuilder); in emitCode() 77 fragBuilder->codeAppendf("half k = %s[%d]%s;", kernel, offset / 4, in emitCode() 81 fDomain.sampleTexture(fragBuilder, in emitCode() 89 fragBuilder->codeAppend("c.rgb /= c.a;"); in emitCode() 90 fragBuilder->codeAppend("c.rgb = saturate(c.rgb);"); in emitCode() [all …]
|
D | GrYUVtoRGBEffect.cpp | 87 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in onCreateGLSLInstance() local 101 coords[i] = fragBuilder->ensureCoords2D(args.fTransformedCoords[i]); in onCreateGLSLInstance() 107 fragBuilder->codeAppendf("half4 %s;", sampleVar.c_str()); in onCreateGLSLInstance() 108 fGLDomains[i].sampleTexture(fragBuilder, args.fUniformHandler, args.fShaderCaps, in onCreateGLSLInstance() 114 fragBuilder->codeAppendf( in onCreateGLSLInstance() 122 fragBuilder->codeAppendf( in onCreateGLSLInstance() 127 fragBuilder->codeAppendf( in onCreateGLSLInstance() 131 fragBuilder->codeAppend("yuvOne *= a;"); in onCreateGLSLInstance() 133 fragBuilder->codeAppend("half a = 1.0;"); in onCreateGLSLInstance() 136 fragBuilder->codeAppendf("%s = half4(yuvOne.xyz, a);", args.fOutputColor); in onCreateGLSLInstance()
|
D | GrConvexPolyEffect.cpp | 49 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 50 fragBuilder->codeAppend("\t\thalf alpha = 1.0;\n"); in emitCode() 51 fragBuilder->codeAppend("\t\thalf edge;\n"); in emitCode() 53 fragBuilder->codeAppendf("\t\tedge = dot(%s[%d], half3(half(sk_FragCoord.x), " in emitCode() 58 fragBuilder->codeAppend("\t\tedge = saturate(edge);\n"); in emitCode() 60 fragBuilder->codeAppend("\t\tedge = edge >= 0.5 ? 1.0 : 0.0;\n"); in emitCode() 62 fragBuilder->codeAppend("\t\talpha *= edge;\n"); in emitCode() 66 fragBuilder->codeAppend("\talpha = 1.0 - alpha;\n"); in emitCode() 68 fragBuilder->codeAppendf("\t%s = %s * alpha;\n", args.fOutputColor, args.fInputColor); in emitCode()
|
/third_party/flutter/skia/src/gpu/glsl/ |
D | GrGLSLXferProcessor.cpp | 20 static void adjust_for_lcd_coverage(GrGLSLXPFragmentBuilder* fragBuilder, in adjust_for_lcd_coverage() argument 24 fragBuilder->codeAppendf("%s.a = max(max(%s.r, %s.g), %s.b);", in adjust_for_lcd_coverage() 35 GrGLSLXPFragmentBuilder* fragBuilder = args.fXPFragBuilder; in emitCode() local 37 const char* dstColor = fragBuilder->dstColor(); in emitCode() 54 fragBuilder->codeAppendf("if (all(lessThanEqual(%s.rgb, half3(0)))) {" in emitCode() 71 fragBuilder->codeAppend("// Read color from copy of the destination.\n"); in emitCode() 72 fragBuilder->codeAppendf("half2 _dstTexCoord = (half2(sk_FragCoord.xy) - %s) * %s;", in emitCode() 76 fragBuilder->codeAppend("_dstTexCoord.y = 1.0 - _dstTexCoord.y;"); in emitCode() 79 fragBuilder->codeAppendf("half4 %s = ", dstColor); in emitCode() 80 fragBuilder->appendTextureLookup(args.fDstTextureSamplerHandle, "_dstTexCoord", in emitCode() [all …]
|
D | GrGLSLFragmentProcessor.cpp | 29 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in invokeChild() local 30 outputColor->append(fragBuilder->getMangleString()); in invokeChild() 31 fragBuilder->codeAppendf("half4 %s;", outputColor->c_str()); in invokeChild() 38 fragBuilder->codeAppendf("%s = %s(%s);", outputColor->c_str(), in invokeChild() 46 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in internalInvokeChild() local 48 fragBuilder->onBeforeChildProcEmitCode(); // call first so mangleString is updated in internalInvokeChild() 57 inputName.appendf("_childInput%s", fragBuilder->getMangleString().c_str()); in internalInvokeChild() 58 fragBuilder->codeAppendf("half4 %s = %s;", inputName.c_str(), inputColor); in internalInvokeChild() 66 EmitArgs childArgs(fragBuilder, in internalInvokeChild() 74 fFunctionNames[childIndex] = fragBuilder->writeProcessorFunction( in internalInvokeChild() [all …]
|
/third_party/skia/src/gpu/ |
D | GrXferProcessor.cpp | 197 static void adjust_for_lcd_coverage(GrGLSLXPFragmentBuilder* fragBuilder, in adjust_for_lcd_coverage() argument 201 fragBuilder->codeAppendf("%s.a = max(max(%s.r, %s.g), %s.b);", in adjust_for_lcd_coverage() 214 GrGLSLXPFragmentBuilder* fragBuilder = args.fXPFragBuilder; in emitCode() local 216 const char* dstColor = fragBuilder->dstColor(); in emitCode() 231 fragBuilder->codeAppendf("if (all(lessThanEqual(%s.rgb, half3(0)))) {" in emitCode() 244 fragBuilder->codeAppendf("half4 %s;", outColor); in emitCode() 247 this->emitBlendCodeForDstRead(fragBuilder, in emitCode() 256 fragBuilder->codeAppendf("%s = %s;", args.fOutputPrimary, outColor); in emitCode() 286 void ProgramImpl::DefaultCoverageModulation(GrGLSLXPFragmentBuilder* fragBuilder, in DefaultCoverageModulation() argument 294 fragBuilder->codeAppendf("half3 lerpRGB = mix(%s.aaa, %s.aaa, %s.rgb);", in DefaultCoverageModulation() [all …]
|
/third_party/flutter/skia/src/shaders/ |
D | SkPerlinNoiseShader.cpp | 838 GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 840 SkString vCoords = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]); in emitCode() 920 fragBuilder->appendTextureLookup(&noiseCode, args.fTexSamplers[0], xCoords.c_str(), in emitCode() 931 fragBuilder->appendTextureLookup(&noiseCode, args.fTexSamplers[0], xCoords.c_str(), in emitCode() 956 fragBuilder->appendTextureLookup(&noiseCode, args.fTexSamplers[1], latticeCoords.c_str(), in emitCode() 968 fragBuilder->appendTextureLookup(&noiseCode, args.fTexSamplers[1], latticeCoords.c_str(), in emitCode() 984 fragBuilder->appendTextureLookup(&noiseCode, args.fTexSamplers[1], latticeCoords.c_str(), in emitCode() 996 fragBuilder->appendTextureLookup(&noiseCode, args.fTexSamplers[1], latticeCoords.c_str(), in emitCode() 1009 fragBuilder->emitFunction(kHalf_GrSLType, in emitCode() 1013 fragBuilder->emitFunction(kHalf_GrSLType, in emitCode() [all …]
|
/third_party/flutter/skia/src/core/ |
D | SkNormalMapSource.cpp | 44 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local 54 fragBuilder->codeAppendf("float3 normal = normalize(%s.rgb - float3(0.5));", in emitCode() 58 fragBuilder->codeAppend( "if (abs(normal.z) > 0.999) {"); in emitCode() 59 fragBuilder->codeAppendf(" %s = normalize(half4(0.0, 0.0, half(normal.z), 0.0));", in emitCode() 66 fragBuilder->codeAppend( "} else {"); in emitCode() 67 fragBuilder->codeAppendf(" float2 transformed = %s * normal.xy;", in emitCode() 69 fragBuilder->codeAppend( " float scalingFactorSquared = " in emitCode() 73 fragBuilder->codeAppendf(" %s = half4(half2(transformed * " in emitCode() 77 fragBuilder->codeAppend( "}"); in emitCode()
|
/third_party/skia/src/gpu/ops/ |
D | GrOvalOpFactory.cpp | 141 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in onEmitCode() local 145 fragBuilder->codeAppend("float4 circleEdge;"); in onEmitCode() 148 fragBuilder->codeAppend("half3 clipPlane;"); in onEmitCode() 153 fragBuilder->codeAppend("half3 isectPlane;"); in onEmitCode() 159 fragBuilder->codeAppend("half3 unionPlane;"); in onEmitCode() 165 fragBuilder->codeAppend("float4 roundCapCenters;"); in onEmitCode() 177 fragBuilder->codeAppendf("half4 %s;", args.fOutputColor); in onEmitCode() 190 fragBuilder->codeAppend("float d = length(circleEdge.xy);"); in onEmitCode() 191 fragBuilder->codeAppend("half distanceToOuterEdge = half(circleEdge.z * (1.0 - d));"); in onEmitCode() 192 fragBuilder->codeAppend("half edgeAlpha = saturate(distanceToOuterEdge);"); in onEmitCode() [all …]
|
D | DashOp.cpp | 786 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in onEmitCode() local 788 fragBuilder->codeAppendf("half4 %s;", args.fOutputColor); in onEmitCode() 789 this->setupUniformColor(fragBuilder, uniformHandler, args.fOutputColor, &fColorUniform); in onEmitCode() 804 fragBuilder->codeAppendf("half xShifted = half(%s.x - floor(%s.x / %s.z) * %s.z);", in onEmitCode() 807 fragBuilder->codeAppendf("half2 fragPosShifted = half2(xShifted, half(%s.y));", in onEmitCode() 809 fragBuilder->codeAppendf("half2 center = half2(%s.y, 0.0);", circleParams.fsIn()); in onEmitCode() 810 fragBuilder->codeAppend("half dist = length(center - fragPosShifted);"); in onEmitCode() 812 fragBuilder->codeAppendf("half diff = dist - %s.x;", circleParams.fsIn()); in onEmitCode() 813 fragBuilder->codeAppend("diff = 1.0 - diff;"); in onEmitCode() 814 fragBuilder->codeAppend("half alpha = saturate(diff);"); in onEmitCode() [all …]
|