{
  "name": "Mirror Frames",
  "curve": "Circular InOut",
  "duration": 0.5,
  "passes": [
    {
      "name": "Mirror Frames",
      "inputs": [
        "default"
      ],
      "glsl": "precision highp float;

varying vec2 textureCoordinate;
varying vec2 sourceTextureCoordinate;

// default uniforms for all filters
uniform float time;
uniform float strength;
uniform vec2 outputSize; // size of the output fbo
uniform vec2 inputSize; // size of the original default input texture
uniform vec2 tex0Size; // size of tex0 for this pass

// default uniforms for transitions and video effects
uniform float progress; // normalized 0-1

// default uniforms for video effects
uniform float duration; // in seconds
uniform float clipDuration; // in seconds

const int LAYERS = 3;
const vec2 center = vec2(0.5,0.5);

// effect uniforms
void main() {

  vec2 uv = sourceTextureCoordinate;
  vec4 color = vec4(0.0);

  float mainScale = mix(1.0, 0.7, progress);

  for(int i = LAYERS; i >= 1; --i){
    float f = float(i) / float(LAYERS);
    float scale_i = mix(mainScale, 1.0, f);
    vec2 p = (uv - center) / scale_i + center;

    float m = step(0.0, p.x) * step(p.x, 1.0) * step(0.0, p.y) * step(p.y, 1.0);

    color = mix(color, sampleInput(p), m);
  }

  {
    vec2 p = (uv - center) / mainScale + center;
    float m = step(0.0,p.x) * step(p.x, 1.0) * step(0.0,p.y) * step(p.y, 1.0);
    color = mix(color, sampleInput(p), m);
  }





  gl_FragColor = toOutputFormat(color);
}
",
      "uniforms": {}
    }
  ]
}
