clear(r, g, b, a, stencil) {
    const gl = cc._renderContext;
    r = r ? r / 255.0 : 0.0;
    g = g ? g / 255.0 : 0.0;
    b = b ? b / 255.0 : 0.0;
    a = a ? a / 255.0 : 0.0;
    gl.clearColor(r, g, b, a);
    if (typeof stencil !== 'undefined') {
      gl.clearStencil(stencil || 0.0);
      gl.clear(gl.COLOR_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
    } else {
      gl.clear(gl.COLOR_BUFFER_BIT);
    }
    /*

    // below is more flexible, but getParameter is a slow op
    // and we should be able to safely skip it

    flags = flags || gl.COLOR_BUFFER_BIT;

    if(flags & gl.COLOR_BUFFER_BIT) {
      lastColor = gl.getParameter(gl.COLOR_CLEAR_VALUE);
      gl.clearColor(r || 0.0, g || 0.0, b || 0.0, a || 0.0);
    }

    if (flags & gl.DEPTH_BUFFER_BIT) {
      lastDepthValue = gl.getParameter(gl.DEPTH_CLEAR_VALUE);
      gl.clearDepth(depthValue);
    }

    if(flags & gl.STENCIL_BUFFER_BIT) {
      lastStencilValue = gl.getParameter(gl.STENCIL_CLEAR_VALUE);
      gl.clearStencil(stencilValue || 0.0);
    }

    gl.clear(flags);

    if (flags & gl.COLOR_BUFFER_BIT) {
      gl.clearColor(lastColor[0], lastColor[1], lastColor[2], lastColor[3]);
    }

    if (flags & gl.DEPTH_BUFFER_BIT) {
      gl.clearDepth(lastDepthValue);
    }

    if (flags & gl.STENCIL_BUFFER_BIT) {
      gl.clearStencil(lastStencilValue);
    }
    */
  }
Clears pass texture, resetting to rgba/stencil parameters.
@param [r = 0] red clear value from 0 to 255
@param [g = 0] green clear value from 0 to 255
@param [b = 0] blue clear value from 0 to 255
@param [a = 0] alpha clear value from 0 to 255
@param [stencil = 0x0]