2023-09-27 06:49:59 +00:00
|
|
|
uniform float intensity; /// set:0.004 max:0.03
|
2023-07-30 19:18:50 +00:00
|
|
|
|
|
|
|
highp float rand(vec2 co) {
|
|
|
|
highp float a = 12.9898;
|
|
|
|
highp float b = 78.233;
|
|
|
|
highp float c = 43758.5453;
|
|
|
|
highp float dt= dot(co.xy ,vec2(a,b));
|
|
|
|
highp float sn= mod(dt,3.14);
|
|
|
|
return fract(sin(sn) * c);
|
|
|
|
}
|
|
|
|
|
|
|
|
void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
|
|
|
|
vec2 uv = fragCoord.xy / iResolution.xy;
|
|
|
|
vec4 fetch = texture(iChannel0, uv + intensity * rand(uv));
|
|
|
|
fragColor = fetch;
|
|
|
|
}
|