export declare const toonVertexShader = "\n precision highp float;\n attribute vec2 position;\n varying vec2 vUV;\n void main(void) {\n vUV = (position + 1.0) * 0.5;\n gl_Position = vec4(position, 0.0, 1.0);\n }\n"; export declare const toonFragmentShader = "\n precision highp float;\n varying vec2 vUV;\n uniform sampler2D textureSampler;\n uniform float levels;\n uniform float blendFactor;\n uniform float edgeThreshold;\n void main(void) {\n vec4 color = texture2D(textureSampler, vUV);\n // Compute edge intensity with a damping factor to reduce sensitivity to movement.\n vec3 dx = dFdx(color.rgb);\n vec3 dy = dFdy(color.rgb);\n float edgeIntensity = (length(dx) + length(dy)) * 0.5; // Dampen edge intensity\n // Use smoothstep with the higher threshold to ignore minor variations.\n float edgeFactor = smoothstep(edgeThreshold, edgeThreshold * 2.0, edgeIntensity);\n // Quantize the color\n vec3 quantized = floor(color.rgb * levels) / levels;\n // Blend the original color with the quantized color.\n vec3 finalColor = mix(color.rgb, quantized, blendFactor * (1.0 - edgeFactor));\n gl_FragColor = vec4(finalColor, color.a);\n }\n"; //# sourceMappingURL=toon.d.cts.map