7.73
58.7 fps
512 x 288
Shader Inputs
uniform vec3 iResolution; // viewport resolution (in pixels)
uniform float iTime; // shader playback time (in seconds)
uniform float iTimeDelta; // render time (in seconds)
uniform float iFrameRate; // shader frame rate
uniform int iFrame; // shader playback frame
uniform float iChannelTime[4]; // channel playback time (in seconds)
uniform vec3 iChannelResolution[4]; // channel resolution (in pixels)
uniform vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click
uniform samplerXX iChannel0..3; // input channel. XX = 2D/Cube
uniform vec4 iDate; // (year, month, day, time in seconds)
uniform float iSampleRate; // sound sample rate (i.e., 44100)
xxxxxxxxxx // no i did not manually set this colours, I used: https://addons.mozilla.org/en-US/firefox/addon/shadertoy-unofficial-plugin/ bsp;
1
float f0(float x) { return x; } // take a guess.... you are probably correct2
float f1(float x) { return pow(x, 2.); }3
float f2(float x) { return mod(x, .5) -.25 ; }4
float f3(float x) { return sin(x); }5
float f4(float x) { return cos(sinh(x)); }6
float ease(float x); // returns x^5; x = [0, 1]7
vec3 draw_grid(vec2 uv);8
float it(float time, float duration, float hold); // it: interpolate time9
float it(float time, float duration); // returns float = [0, 1] 10
11
void mainImage( out vec4 fragColor, in vec2 fragCoord )12
{13
// normalised from -1 to 1 in the y axis14
vec2 uv = (2.0 * fragCoord - iResolution.xy) / iResolution.y;15
const float speed_multiplier = 1.5;16
float time = mod(iTime * speed_multiplier, 52.0);17
18
vec3 col;19
20
// test normals21
/** 22
if(length(uv + 1.0) < 1.0).0)23
col = vec3(1);24
**/25
26
// First scene: default uv and the ball27
if (time 5.0) { 28
vec2 uv2 = fragCoord/iResolution.xy;29
col = 0.5 + 0.5*cos(iTime+uv2.xyx+vec3(0,2,4)); // the default bg of shadertoy30
31
float circlePos = mix(1.5, 0.0, it(time, 2.));32
float circleSize = mix(0.1, 4.0, it(time, 3.0, 2.0)); // 3s -> dur, r, 33
// 2s -> waitait34
35
col = mix(vec3(0.7), 36
col, 37
smoothstep(circleSize - 0.02, 38
circleSize, 39
length(uv + circlePos))); 40
} else if (time 12.0) { // animate the grid 41
time -= 5.; // reset time to 0 for easy interpolation of time42
col = vec3(0.7); // default bg colour Filter
Wrap
iChannel0
Filter
Wrap
iChannel1
Filter
Wrap
iChannel2
Filter
Wrap
iChannel3
Comments (0)
Sign in to post a comment.