mirror of
https://github.com/seigler/generative
synced 2025-07-27 07:06:08 +00:00
publish: make room for future sketches
generated from commit 68a08e1763f1028c9229b91f7886406715c44475
This commit is contained in:
parent
f2393d2fe7
commit
4114418129
7 changed files with 41 additions and 20 deletions
|
@ -1,17 +1,21 @@
|
|||
precision mediump float;
|
||||
|
||||
uniform vec2 u_resolution;
|
||||
uniform float u_alpha;
|
||||
|
||||
float random (vec2 st) {
|
||||
return fract(sin(dot(st.xy,
|
||||
vec2(12.9898,78.233)))*
|
||||
43758.5453123);
|
||||
highp float random(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 main() {
|
||||
vec2 st = gl_FragCoord.xy/u_resolution.xy;
|
||||
|
||||
float rnd = random( st );
|
||||
float rnd = random(st);
|
||||
|
||||
gl_FragColor = vec4(vec3(rnd),0.05);
|
||||
gl_FragColor = vec4(vec3(rnd), u_alpha);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue