{
  "name": "Blackout (Fade Black)",
  "type": "dynamic",
  "duration": 0.5,
  "passes": [
    {
      "name": "blackout",
      "inputs": [
        "default"
      ],
      "glsl": "precision highp float;

varying vec2 sourceTextureCoordinate;

uniform float progress; // normalized 0-1
uniform vec3 fadeColor; // unused for now
uniform float inOutSwitch;


void main() {
  vec2 uv = sourceTextureCoordinate;

  float progressDirection = mix(progress, 1.0 - progress, inOutSwitch);
  vec4 color = sampleInput(uv) * (1.0 - progressDirection);
  color.a = 1.0;
  gl_FragColor = toOutputFormat(color);
}
",
      "uniforms": {
        "fadeColor": {
          "value": [
            0,
            0,
            0
          ]
        },
        "inOutSwitch": {
          "value": 0
        }
      }
    }
  ]
}
