From 0bf035e7bb920ff569085d5508c182ac89724102 Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Fri, 24 Apr 2020 16:07:47 +1000 Subject: [PATCH] initial --- fence/art-of-code-example.frag | 18 ++++++++++++++++++ fence/example.frag | 28 ++++++++++++++++++++++++++++ fence/kynd functions.png | Bin 0 -> 23004 bytes fence/mod_with_number_first.frag | 28 ++++++++++++++++++++++++++++ fence/scratch.frag | 19 +++++++++++++++++++ simplest.frag | 15 +++++++++++++++ 6 files changed, 108 insertions(+) create mode 100644 fence/art-of-code-example.frag create mode 100644 fence/example.frag create mode 100644 fence/kynd functions.png create mode 100644 fence/mod_with_number_first.frag create mode 100644 fence/scratch.frag create mode 100644 simplest.frag diff --git a/fence/art-of-code-example.frag b/fence/art-of-code-example.frag new file mode 100644 index 0000000..22f0c7e --- /dev/null +++ b/fence/art-of-code-example.frag @@ -0,0 +1,18 @@ +#ifdef GL_ES +precision mediump float; +#endif + +uniform vec2 u_resolution; +uniform vec2 u_mouse; +uniform float u_time; + +void main() { + vec3 color = vec3(0); + vec2 st = (gl_FragCoord.xy-.5*u_resolution.xy)/u_resolution.y; + + float m = smoothstep(0.05, 0.0, abs(st.x)); + color += m; + + gl_FragColor = vec4(color,1.0); +} + diff --git a/fence/example.frag b/fence/example.frag new file mode 100644 index 0000000..69e5582 --- /dev/null +++ b/fence/example.frag @@ -0,0 +1,28 @@ +#ifdef GL_ES +precision mediump float; +#endif + +uniform vec2 u_resolution; +uniform vec2 u_mouse; +uniform float u_time; + +// Plot a line on Y using a value between 0.0-1.0 +float plot(vec2 st, float pct){ + return smoothstep( pct-0.02, pct, st.y) - + smoothstep( pct, pct+0.02, st.y); +} + +void main() { + vec2 st = gl_FragCoord.xy/u_resolution; + + float y = st.x; + + vec3 color = vec3(y); + + // Plot a line + float pct = plot(st,y); + color = (1.0-pct)*color+pct*vec3(0.0,1.0,0.0); + + gl_FragColor = vec4(color,1.0); +} + diff --git a/fence/kynd functions.png b/fence/kynd functions.png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oFH*|SbY=vC)J}H{{K|n+a literal 0 HcmV?d00001 diff --git a/fence/mod_with_number_first.frag b/fence/mod_with_number_first.frag new file mode 100644 index 0000000..aa75589 --- /dev/null +++ b/fence/mod_with_number_first.frag @@ -0,0 +1,28 @@ +#ifdef GL_ES +precision mediump float; +#endif + +uniform vec2 u_resolution; +uniform vec2 u_mouse; +uniform float u_time; + +// Plot a line on Y using a value between 0.0-1.0 +float plot(vec2 st, float pct){ + return smoothstep( pct-0.02, pct, st.y) - + smoothstep( pct, pct+0.02, st.y); +} + +void main() { + vec2 st = gl_FragCoord.xy/u_resolution; + + float y = mod(13.5, st.x); + + vec3 color = vec3(y); + + // Plot a line + float pct = plot(st,y); + color = (1.0-pct)*color+pct*vec3(0.0,1.0,0.0); + + gl_FragColor = vec4(color,1.0); +} + diff --git a/fence/scratch.frag b/fence/scratch.frag new file mode 100644 index 0000000..0b9f0ee --- /dev/null +++ b/fence/scratch.frag @@ -0,0 +1,19 @@ +#ifdef GL_ES +precision mediump float; +#endif + +uniform vec2 u_resolution; +uniform vec2 u_mouse; +uniform float u_time; + +void main() { + vec3 color = vec3(0); + vec2 st = (gl_FragCoord.xy-.5*u_resolution.xy)/u_resolution.y; + st *= u_time; + + float m = .5 - abs(sin(st.x)); + color += m; + + gl_FragColor = vec4(color,1.0); +} + diff --git a/simplest.frag b/simplest.frag new file mode 100644 index 0000000..aaa04e1 --- /dev/null +++ b/simplest.frag @@ -0,0 +1,15 @@ +#ifdef GL_ES +precision mediump float; +#endif + +uniform vec2 u_resolution; +uniform vec2 u_mouse; +uniform float u_time; + +void main() { + // make a vector that puts all x and y values between 0.0 - 1.0 so we can use it as a color + vec2 st = gl_FragCoord.xy/u_resolution; + // use time to change the blue hue of the screen + gl_FragColor = vec4(st.x,st.y,abs(sin(u_time)),1.0); +} +