nerates a shaded relief image given elevation data.  Uses a 3x3
 * neighborhood for determining slope and aspect.
 * @param {Array.&lt;ImageData&gt;} inputs Array of input images.
 * @param {Object} data Data added in the &quot;beforeoperations&quot; event.
 * @return {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 shade