text: "use strict";
  
  var program = null;
  
  /**
   *
   * @param context
   * @returns {WorkingWebGLProgram}
   */
  function getProgram (context) {
    if (program === null) {
      program = context.createProgram(`#version 300 es
  
        precision highp float;
        precision highp int;
        precision highp sampler2D;
  
        layout(location = 0) out vec4 fragColor;
  
        uniform vec2 resolution;
        uniform float seed;
  
        uniform float amount;
  
        uniform sampler2D source;
        uniform bool sourceSet;
        uniform vec2 sourceSize;
  
        vec4 process (in vec2 uv) {
          vec4 base = texture(source, uv);
  
          return vec4(mix(base.rgb, vec3(1.) - base.rgb, amount), base.a);
        }
  
        void main () {
            vec2 uv = gl_FragCoord.xy / resolution;
  
            if (sourceSet == true) {
              fragColor = process(uv);
            } else {
              fragColor = vec4(0., 0., 0., 1.);
            }
        }
  
      `, {
        amount: 'f',
        source: 't'
      });
    }
  
    return program;
  }
  
  function invertJob (context, inputs, outputs, parameters, done) {
    var program = getProgram(context);
    var uniforms = {
      source: inputs.input,
      amount: parameters.amount
    };
  
    program.execute(uniforms, outputs.output);
  
    done();
  }
  
  module.exports = invertJob;