/**
 * NOTE: This file is autogenerated. Do not edit.
 */
export const outlineCalculatorShader = {
    vertex: (options) => /* glsl */ `
`,
    fragment: (options) => /* glsl */ `
        precision highp float;
        varying vec2 vUV;
        
        // Samplers
        uniform sampler2D outlinesSampler;
        uniform vec2 resolution;
        uniform vec3 outlineColor;
        uniform vec2 sampleKernel[sampleKernelSize];
        
        void main(void)
        {
            vec2 sampleUV = vUV;
        
            vec3 centerOutlineSample = texture2D(outlinesSampler, sampleUV).rgb;
            float edge = 0.0;
        
            for (int i = 0; i < sampleKernelSize; i++) {
                
                vec2 offset = sampleKernel[i] * resolution;
                vec3 kernelSample = texture2D(outlinesSampler, sampleUV + offset).rgb;
        
                #ifdef unifiedOutline
                    float centerIsWritten = step(0.001, length(centerOutlineSample));
                    float sampleIsWritten = step(0.001, length(kernelSample));
        
                    edge = max(edge, abs(centerIsWritten - sampleIsWritten));
                #else
                    float rDiff = abs(centerOutlineSample.r - kernelSample.r);
                    float gDiff = abs(centerOutlineSample.g - kernelSample.g);
                    float bDiff = abs(centerOutlineSample.b - kernelSample.b);
        
                    float maxDiff = max(max(rDiff, gDiff), bDiff);
                    edge = max(edge, step(0.0001, maxDiff));
                #endif
            }
        
            gl_FragColor = vec4(outlineColor * edge, edge);
        }`
};
//# sourceMappingURL=OutlineCalculatorShader.js.map