1layout(binding=0) uniform sampler2D uTextureSampler_0_Stage1; 2layout (binding=0) uniform uniformBuffer 3{ 4 layout(offset=0) float4 sk_RTAdjust; 5 layout(offset=16) half2 uIncrement_Stage1_c0; 6 layout(offset=32) half4 uKernel_Stage1_c0[7]; 7 layout(offset=144) float3x3 umatrix_Stage1_c0_c0; 8 layout(offset=192) half4 uborder_Stage1_c0_c0_c0; 9 layout(offset=208) float4 usubset_Stage1_c0_c0_c0; 10 layout(offset=224) float4 unorm_Stage1_c0_c0_c0; 11}; 12layout(location = 0) in float2 vLocalCoord_Stage0; 13layout(location = 0, index = 0) out half4 sk_FragColor; 14half4 TextureEffect_Stage1_c0_c0_c0(half4 _input, float2 _coords) 15{ 16 half4 _output; 17 float2 inCoord = _coords; 18 inCoord *= unorm_Stage1_c0_c0_c0.xy; 19 float2 subsetCoord; 20 subsetCoord.x = inCoord.x; 21 subsetCoord.y = inCoord.y; 22 float2 clampedCoord; 23 clampedCoord = subsetCoord; 24 half4 textureColor = sample(uTextureSampler_0_Stage1, (clampedCoord) * unorm_Stage1_c0_c0_c0.zw); 25 float snappedX = floor(inCoord.x + 0.001) + 0.5; 26 if (snappedX < usubset_Stage1_c0_c0_c0.x || snappedX > usubset_Stage1_c0_c0_c0.z) 27 { 28 textureColor = uborder_Stage1_c0_c0_c0; 29 } 30 return textureColor; 31} 32half4 MatrixEffect_Stage1_c0_c0(half4 _input, float2 _coords) 33{ 34 half4 _output; 35 return TextureEffect_Stage1_c0_c0_c0(_input, ((umatrix_Stage1_c0_c0) * _coords.xy1).xy); 36} 37inline half4 GaussianConvolution_Stage1_c0(half4 _input) 38{ 39 half4 _output; 40 _output = half4(0, 0, 0, 0); 41 float2 coord = vLocalCoord_Stage0 - 12.0 * uIncrement_Stage1_c0; 42 float2 coordSampled = half2(0, 0); 43 coordSampled = coord; 44 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[0].x; 45 coord += uIncrement_Stage1_c0; 46 coordSampled = coord; 47 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[0].y; 48 coord += uIncrement_Stage1_c0; 49 coordSampled = coord; 50 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[0].z; 51 coord += uIncrement_Stage1_c0; 52 coordSampled = coord; 53 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[0].w; 54 coord += uIncrement_Stage1_c0; 55 coordSampled = coord; 56 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[1].x; 57 coord += uIncrement_Stage1_c0; 58 coordSampled = coord; 59 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[1].y; 60 coord += uIncrement_Stage1_c0; 61 coordSampled = coord; 62 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[1].z; 63 coord += uIncrement_Stage1_c0; 64 coordSampled = coord; 65 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[1].w; 66 coord += uIncrement_Stage1_c0; 67 coordSampled = coord; 68 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[2].x; 69 coord += uIncrement_Stage1_c0; 70 coordSampled = coord; 71 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[2].y; 72 coord += uIncrement_Stage1_c0; 73 coordSampled = coord; 74 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[2].z; 75 coord += uIncrement_Stage1_c0; 76 coordSampled = coord; 77 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[2].w; 78 coord += uIncrement_Stage1_c0; 79 coordSampled = coord; 80 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[3].x; 81 coord += uIncrement_Stage1_c0; 82 coordSampled = coord; 83 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[3].y; 84 coord += uIncrement_Stage1_c0; 85 coordSampled = coord; 86 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[3].z; 87 coord += uIncrement_Stage1_c0; 88 coordSampled = coord; 89 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[3].w; 90 coord += uIncrement_Stage1_c0; 91 coordSampled = coord; 92 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[4].x; 93 coord += uIncrement_Stage1_c0; 94 coordSampled = coord; 95 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[4].y; 96 coord += uIncrement_Stage1_c0; 97 coordSampled = coord; 98 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[4].z; 99 coord += uIncrement_Stage1_c0; 100 coordSampled = coord; 101 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[4].w; 102 coord += uIncrement_Stage1_c0; 103 coordSampled = coord; 104 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[5].x; 105 coord += uIncrement_Stage1_c0; 106 coordSampled = coord; 107 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[5].y; 108 coord += uIncrement_Stage1_c0; 109 coordSampled = coord; 110 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[5].z; 111 coord += uIncrement_Stage1_c0; 112 coordSampled = coord; 113 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[5].w; 114 coord += uIncrement_Stage1_c0; 115 coordSampled = coord; 116 _output += MatrixEffect_Stage1_c0_c0(_input, coordSampled) * uKernel_Stage1_c0[6].x; 117 coord += uIncrement_Stage1_c0; 118 _output *= _input; 119 return _output; 120} 121void main() 122{ 123 half4 outputColor_Stage0; 124 half4 outputCoverage_Stage0; 125 { 126 // Stage 0, QuadPerEdgeAAGeometryProcessor 127 outputColor_Stage0 = half4(1); 128 outputCoverage_Stage0 = half4(1); 129 } 130 half4 output_Stage1; 131 output_Stage1 = GaussianConvolution_Stage1_c0(outputColor_Stage0); 132 { 133 // Xfer Processor: Porter Duff 134 sk_FragColor = output_Stage1 * outputCoverage_Stage0; 135 } 136} 137