shaders

assortment of fragment shaders.
Log | Files | Refs | README | LICENSE

commit 6487ca220d0eff32b0cde7aa024bdb75b4b36012
parent 41fdd8440b27b463b27f2afda901ede873c1f0bd
Author: mpizzzle <m@michaelpercival.xyz>
Date:   Mon,  7 Sep 2020 15:46:14 +0100

Minor adaptation to silexargs shader

Diffstat:
Asilexsargs.frag | 24++++++++++++++++++++++++
1 file changed, 24 insertions(+), 0 deletions(-)

diff --git a/silexsargs.frag b/silexsargs.frag @@ -0,0 +1,24 @@ +// http://www.pouet.net/prod.php?which=57245 +// If you intend to reuse this shader, please add credits to 'Danilo Guanabara' + +uniform float u_time; +uniform vec2 u_resolution; + +void main() { + vec3 c; + float l, z = u_time; + + for(int i = 0; i < 3; i++) { + vec2 uv, p = gl_FragCoord.xy / u_resolution; + uv = p; + p -= .5; + p.x *= u_resolution.x / u_resolution.y; + z += .07; + l = length(p); + l *= l; + uv += p / l * (sin(z) + 1.) * abs(sin(l * 9. - z * 2.)); + c[i] = .01 / length(abs(mod(uv, 1.) - .5)); + } + + gl_FragColor = vec4(c / l, u_time); +}