11 #include "motion_vectors_fs.glsl"
13 const int NOISE_LOOP = 3;
14 vec3 digital_noise( uvec3 iuv ){
15 iuv *=uvec3(8,2524,7552);
16 for( int i=0; i<NOISE_LOOP; i++ )
17 iuv += (iuv.yzx<<2) ^ (iuv.yxz)+iuv.z;
18 return vec3(iuv)*(1.0/float(0xffffffffU));
21 vec2 rand_hash22( vec2 p ){
22 vec3 p3 = fract(vec3(p.xyx) * 213.8976123);
23 p3 += dot(p3, p3.yzx+19.19);
24 return fract(vec2((p3.x + p3.y)*p3.z, (p3.x+p3.z)*p3.y));
28 compute_motion_vectors();
30 vec2 ssuv = gl_FragCoord.xy;
31 float grad = 1.0-aUv.y*0.1;
32 float opacity = rand_hash22( vec2(floor(aUv.y*100.0),floor(aCo.z*10.0+uTime*40.0)) ).r*grad;
34 vec3 vDither = vec3( dot( vec2( 171.0, 231.0 ), ssuv) );
35 float dither = fract( vDither.g / 71.0 ) - 0.5;
40 FragColor = vec4(0.7,0.5,0.5,1.0);