constructor(renderer, {
        shaderPass,
        depth = false,
        clear = true,

        maxWidth,
        maxHeight,
        minWidth = 1024,
        minHeight = 1024,

        texturesOptions = {}
    } = {}) {
        this.type = "RenderTarget";

        // we could pass our curtains object OR our curtains renderer object
        renderer = renderer && renderer.renderer || renderer;

        if(!renderer || renderer.type !== "Renderer") {
            throwError(this.type + ": Renderer not passed as first argument", renderer);
        }
        else if(!renderer.gl) {
            if(!renderer.production) throwError(this.type + ": Unable to create a " + this.type + " because the Renderer WebGL context is not defined");

            // return if no gl context
            return;
        }
        this.renderer = renderer;
        this.gl = this.renderer.gl;

        this.index = this.renderer.renderTargets.length;

        this._shaderPass = shaderPass;

        // whether to create a render buffer
        this._depth = depth;

        this._shouldClear = clear;

        this._maxSize = {
            width: maxWidth ? Math.min(this.renderer.state.maxTextureSize / 4, maxWidth) : this.renderer.state.maxTextureSize / 4, // enough!
            height: maxHeight ? Math.min(this.renderer.state.maxTextureSize / 4, maxHeight) : this.renderer.state.maxTextureSize / 4,
        };

        this._minSize = {
            width: minWidth * this.renderer.pixelRatio,
            height: minHeight * this.renderer.pixelRatio,
        };

        // default textures options depends on the type of Mesh and WebGL context
        texturesOptions = Object.assign({
            // set default sampler to "uRenderTexture" and isFBOTexture to true
            sampler: "uRenderTexture",
            isFBOTexture: true,

            premultiplyAlpha: false,
            anisotropy: 1,
            generateMipmap: false,

            floatingPoint: "none",

            wrapS: this.gl.CLAMP_TO_EDGE,
            wrapT: this.gl.CLAMP_TO_EDGE,

            minFilter: this.gl.LINEAR,
            magFilter: this.gl.LINEAR,
        }, texturesOptions);
        this._texturesOptions = texturesOptions;

        this.userData = {};

        this.uuid = generateUUID();

        this.renderer.renderTargets.push(this);
        // we've added a new object, keep Curtains class in sync with our renderer
        this.renderer.onSceneChange();

        this._initRenderTarget();
    }
Here we create a RenderTarget class object

 params :
 @renderer (Curtains renderer or Renderer class object): our curtains object OR our curtains renderer object

 @shaderPass (ShaderPass class object): shader pass that will use that render target. Default to null
 @depth (bool, optional): whether to create a depth buffer (handle depth inside your render target). Default to false.
 @clear (bool, optional): whether the content of the render target should be cleared before being drawn. Should be set to false to handle ping-pong shading. Default to true.

 @minWidth (float, optional): minimum width of the render target
 @minHeight (float, optional): minimum height of the render target

 @texturesOptions (object, optional): options and parameters to apply to the render target texture. See the Texture class object.

 returns :
 @this: our RenderTarget class object
*