1
2
3
4
5
6
7
8
9
10
| shader_type canvas_item;
float rand(vec2 p){return fract(sin(dot(p,vec2(12.3,45.6)))*43758.5);}
uniform float progress:hint_range(0,1)=0.5;
void fragment(){
vec2 cell=floor(UV*40.0);
float r=rand(cell);
COLOR=texture(TEXTURE,UV)*step(progress,r);
}
|