mirror of
https://github.com/seigler/generative
synced 2025-07-26 22:56:10 +00:00
Add noise
This commit is contained in:
parent
df579cead2
commit
0e271449a6
4 changed files with 47 additions and 18 deletions
17
app/assets/shaders/white-noise.frag
Normal file
17
app/assets/shaders/white-noise.frag
Normal file
|
@ -0,0 +1,17 @@
|
|||
precision mediump float;
|
||||
|
||||
uniform vec2 u_resolution;
|
||||
|
||||
float random (vec2 st) {
|
||||
return fract(sin(dot(st.xy,
|
||||
vec2(12.9898,78.233)))*
|
||||
43758.5453123);
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 st = gl_FragCoord.xy/u_resolution.xy;
|
||||
|
||||
float rnd = random( st );
|
||||
|
||||
gl_FragColor = vec4(vec3(rnd),0.05);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue