ImageData} Output image.
       */
      function shade(inputs, data) {
        var elevationImage &#x3D; inputs[0];
        var width &#x3D; elevationImage.width;
        var height &#x3D; elevationImage.height;
        var elevationData &#x3D; elevationImage.data;
        var shadeData &#x3D; new Uint8ClampedArray(elevationData.length);
        var dp &#x3D; data.resolution * 2;
        var maxX &#x3D; width - 1;
        var maxY &#x3D; height - 1;
        var pixel &#x3D; [0, 0, 0, 0];
        var twoPi 