mirror of
https://github.com/seigler/generative
synced 2025-07-27 07:06:08 +00:00
publish: Add noise
generated from commit 251cec931d4bd49e402105964a8b2d087f1ebd87
This commit is contained in:
parent
31b6727b5d
commit
f2393d2fe7
6 changed files with 19 additions and 2 deletions
17
shaders/white-noise.frag
Normal file
17
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