Encounter GLSL
This commit is contained in:
16
encounter_shadertoy.glsl
Normal file
16
encounter_shadertoy.glsl
Normal file
@@ -0,0 +1,16 @@
|
||||
#define RESOLUTION (1. / iResolution.xy)
|
||||
#define MAX_MOSAIC 16.
|
||||
#define SPEED 48.
|
||||
#define FADEOUT_TIME 1.30
|
||||
#define FADOUT_SPEED 3.
|
||||
|
||||
void mainImage( out vec4 fragColor, in vec2 fragCoord )
|
||||
{
|
||||
vec2 uv = fragCoord/iResolution.xy;
|
||||
|
||||
float mosaic = floor(((iTime * SPEED) < MAX_MOSAIC) ? iTime * SPEED : (iTime * SPEED) - MAX_MOSAIC) + 1.;
|
||||
uv = floor(uv / RESOLUTION / mosaic) * RESOLUTION * mosaic;
|
||||
|
||||
// Output to screen
|
||||
fragColor = texture(iChannel0,uv) * max(0., min(1., (FADEOUT_TIME * FADOUT_SPEED) - (iTime * FADOUT_SPEED)));
|
||||
}
|
||||
Reference in New Issue
Block a user