Files
TunnelProofOfConcept/.cache/85/7361dbef2adab4203708b017091403.json
2023-12-14 15:25:30 +01:00

1 line
2.3 KiB
JSON

{"id":"maiY","dependencies":[{"name":"/Users/marco/codeProjects/Tunnelv0.000000001/package.json","includedInParent":true,"mtime":1702561850976}],"generated":{"js":"module.exports=\"#define GLSLIFY 1\\nvarying vec2 vUv;\\nuniform float time;\\nuniform sampler2D u_texture;\\n\\n// https://www.shadertoy.com/view/4djSRW\\nfloat hash12(vec2 p){\\n vec3 p3 = fract(vec3(p.xyx) * .1031);\\n p3 += dot(p3, p3.yzx + 33.33);\\n return fract((p3.x + p3.y) * p3.z);\\n}\\n\\nvoid main() {\\n vec2 uv = vUv;\\n\\n uv.x *= 3.142596;\\n\\n const float numbers = 9.0;\\n\\n vec2 repeat = vec2(30.0, 60.0);\\n\\n vec2 cell = (uv * repeat);\\n\\n cell.x *= numbers;\\n cell = floor(cell);\\n\\n float rand = 100.0 * hash12(cell);\\n\\n float offset = mod(floor(time + rand), numbers) / numbers;\\n uv = fract(uv * repeat);\\n uv.x = fract(uv.x + offset);\\n\\n vec4 color = texture2D(u_texture, uv);\\n\\n color -= 0.05 * vec4(vec3(rand), 1.0);\\n gl_FragColor = color;\\n}\";"},"sourceMaps":{"js":{"mappings":[{"source":"src/shaders/fragment.glsl","name":"module","original":{"line":1,"column":0},"generated":{"line":1,"column":0}},{"source":"src/shaders/fragment.glsl","name":"exports","original":{"line":1,"column":7},"generated":{"line":1,"column":7}},{"source":"src/shaders/fragment.glsl","original":{"line":1,"column":15},"generated":{"line":1,"column":15}}],"sources":{"src/shaders/fragment.glsl":"module.exports=\"#define GLSLIFY 1\\nvarying vec2 vUv;\\nuniform float time;\\nuniform sampler2D u_texture;\\n\\n// https://www.shadertoy.com/view/4djSRW\\nfloat hash12(vec2 p){\\n vec3 p3 = fract(vec3(p.xyx) * .1031);\\n p3 += dot(p3, p3.yzx + 33.33);\\n return fract((p3.x + p3.y) * p3.z);\\n}\\n\\nvoid main() {\\n vec2 uv = vUv;\\n\\n uv.x *= 3.142596;\\n\\n const float numbers = 9.0;\\n\\n vec2 repeat = vec2(30.0, 60.0);\\n\\n vec2 cell = (uv * repeat);\\n\\n cell.x *= numbers;\\n cell = floor(cell);\\n\\n float rand = 100.0 * hash12(cell);\\n\\n float offset = mod(floor(time + rand), numbers) / numbers;\\n uv = fract(uv * repeat);\\n uv.x = fract(uv.x + offset);\\n\\n vec4 color = texture2D(u_texture, uv);\\n\\n color -= 0.05 * vec4(vec3(rand), 1.0);\\n gl_FragColor = color;\\n}\";"},"lineCount":null}},"error":null,"hash":"53fea719669dee75b0f4128c0196c8ce","cacheData":{"env":{}}}