1 /* This is free and unencumbered software released into the public
2 domain. To the extent possible under law, the author of this file
3 waives all copyright and related or neighboring rights to it.
8 varying vec2 fTexCoord;
10 uniform sampler2D tex;
12 uniform vec2 resolution;
17 vec2 coord = floor(fTexCoord * resolution);
18 vec3 n = vec3(coord.xy, cut);
19 float p = 1.0 - range * abs(snoise(n));
20 vec3 modulated = fColor.rgb * p;
21 vec4 texColor = texture2D(tex, fTexCoord);
22 gl_FragColor = vec4(modulated * fColor.a, fColor.a) * texColor;