code: function (renderer, camera, type, viewport) {
          var debugTypes = {
              normal: 0,
              depth: 1,
              position: 2,
              glossiness: 3,
              metalness: 4,
              albedo: 5,
              velocity: 6
          };
          if (debugTypes[type] == null) {
              console.warn('Unkown type "' + type + '"');
              // Default use normal
              type = 'normal';
          }
  
          renderer.saveClear();
          renderer.saveViewport();
          renderer.clearBit = renderer.gl.DEPTH_BUFFER_BIT;
  
          if (viewport) {
              renderer.setViewport(viewport);
          }
          var viewProjectionInv = new Matrix4();
          Matrix4.multiply(viewProjectionInv, camera.worldTransform, camera.invProjectionMatrix);
  
          var debugPass = this._debugPass;
          debugPass.setUniform('viewportSize', [renderer.getWidth(), renderer.getHeight()]);
          debugPass.setUniform('gBufferTexture1', this._gBufferTex1);
          debugPass.setUniform('gBufferTexture2', this._gBufferTex2);
          debugPass.setUniform('gBufferTexture3', this._gBufferTex3);
          debugPass.setUniform('gBufferTexture4', this._gBufferTex4);
          debugPass.setUniform('debug', debugTypes[type]);
          debugPass.setUniform('viewProjectionInv', viewProjectionInv.array);
          debugPass.render(renderer);
  
          renderer.restoreViewport();
          renderer.restoreClear();
      }
docs: Debug output of gBuffer. Use `type` parameter to choos the debug output type, which can be:
  
  + 'normal'
  + 'depth'
  + 'position'
  + 'glossiness'
  + 'metalness'
  + 'albedo'
  + 'velocity'
  
  @param {clay.Renderer} renderer
  @param {clay.Camera} camera
  @param {string} [type='normal']