export declare const fragmentShader = "uniform sampler2D outlinedObjectsTexture;\nuniform float lineWidth;\nuniform vec3 outlineColor;\nuniform float edgeFactor;\nvarying vec2 vUv;\n\nvoid main() {\n // screen space derivatives for line width\n vec2 sampleStep = lineWidth * vec2(dFdx(vUv.x), dFdy(vUv.y));\n vec4 currentColor = texture2D(outlinedObjectsTexture, vUv);\n\n vec4 neighbors[8];\n neighbors[0] = texture2D(outlinedObjectsTexture, vUv + vec2(-sampleStep.x, sampleStep.y)); // Top-Left\n neighbors[1] = texture2D(outlinedObjectsTexture, vUv + vec2(0.0f, sampleStep.y)); // Top\n neighbors[2] = texture2D(outlinedObjectsTexture, vUv + vec2(sampleStep.x, sampleStep.y)); // Top-Right\n neighbors[3] = texture2D(outlinedObjectsTexture, vUv + vec2(sampleStep.x, 0.0f)); // Right\n neighbors[4] = texture2D(outlinedObjectsTexture, vUv + vec2(sampleStep.x, -sampleStep.y)); // Bottom-Right\n neighbors[5] = texture2D(outlinedObjectsTexture, vUv + vec2(0.0f, -sampleStep.y)); // Bottom\n neighbors[6] = texture2D(outlinedObjectsTexture, vUv + vec2(-sampleStep.x, -sampleStep.y)); // Bottom-Left\n neighbors[7] = texture2D(outlinedObjectsTexture, vUv + vec2(-sampleStep.x, 0.0f)); // Left\n\n float edgeDetectValue = 0.0f;\n for (int i = 0; i < 8; i++) {\n edgeDetectValue += step(edgeFactor, length(currentColor.rgb - neighbors[i].rgb));\n }\n\n float smoothAlpha = smoothstep(0.1f, 3.f, edgeDetectValue);\n gl_FragColor = vec4(outlineColor, smoothAlpha);\n}";