export declare const frag = "\n\nuniform sampler2D u_Texture;\nin vec2 v_Uv;\n\nconst float PI = 3.14159265;\nconst float TAU = 2.0 * PI;\n\nconst int rayCount = 8;\nconst int maxSteps = 128;\nconst bool showNoise = true;\nconst bool accumRadiance = true;\nconst vec2 size = vec2(570.0, 252.0);\n\n\n float random (in vec2 st) {\n return fract(sin(dot(st.xy,\n vec2(12.9898,78.233)))*\n 43758.5453123);\n }\n\n\nvec4 raymarch() {\n vec4 light = texture(SAMPLER_2D(u_Texture), v_Uv);\n\n // red light\n if (light.r == 1.0) {\n return light;\n }\n \n float oneOverRayCount = 1.0 / float(rayCount);\n float tauOverRayCount = TAU * oneOverRayCount;\n \n // Different noise every pixel\n float noise = showNoise ? random(v_Uv) : 0.1;\n \n vec4 radiance = vec4(0.0);\n \n // Shoot rays in \"rayCount\" directions, equally spaced, with some randomness.\n for(int i = 0; i < rayCount; i++) {\n float angle = tauOverRayCount * (float(i) + noise);\n vec2 rayDirectionUv = vec2(cos(angle), -sin(angle)) / size;\n vec2 traveled = vec2(0.0);\n \n int initialStep = accumRadiance ? 0 : max(0, maxSteps - 1);\n for (int step = initialStep; step < maxSteps; step++) {\n // Go the direction we're traveling (with noise)\n vec2 sampleUv = v_Uv + rayDirectionUv * float(step);\n \n if (sampleUv.x < 0.0 || sampleUv.x > 1.0 || sampleUv.y < 0.0 || sampleUv.y > 1.0) {\n break;\n }\n \n vec4 sampleLight = texture(SAMPLER_2D(u_Texture), sampleUv);\n if (sampleLight.a > 0.5) {\n radiance += sampleLight;\n break;\n }\n } \n }\n \n // Average radiance\n return radiance * oneOverRayCount;\n}\n\nout vec4 outputColor;\n\nvoid main() {\n // outputColor = texture(SAMPLER_2D(u_Texture), v_Uv);\n\n outputColor = vec4(raymarch().rgb, 1.0);\n}\n";