_getNearPlaneIntersections(corners, mvpCorners, clippedCorners) {
        // rebuild the clipped corners based on non clipped ones
        const mVPMatrix = this._matrices.modelViewProjection.matrix;

        if(clippedCorners.length === 1) {
            // we will have 5 corners to check so we'll need to push a new entry in our mvpCorners array
            if(clippedCorners[0] === 0) {
                // top left is culled
                // get intersection iterating from top right
                mvpCorners[0] = this._getIntersection(mvpCorners[1], tempCulledCorner1.set(0.95, 1, 0).applyMat4(mVPMatrix));

                // get intersection iterating from bottom left
                mvpCorners.push(this._getIntersection(mvpCorners[3], tempCulledCorner2.set(-1, -0.95, 0).applyMat4(mVPMatrix)));
            }
            else if(clippedCorners[0] === 1) {
                // top right is culled
                // get intersection iterating from top left
                mvpCorners[1] = this._getIntersection(mvpCorners[0], tempCulledCorner1.set(-0.95, 1, 0).applyMat4(mVPMatrix));

                // get intersection iterating from bottom right
                mvpCorners.push(this._getIntersection(mvpCorners[2], tempCulledCorner2.set(1, -0.95, 0).applyMat4(mVPMatrix)));
            }
            else if(clippedCorners[0] === 2) {
                // bottom right is culled
                // get intersection iterating from bottom left
                mvpCorners[2] = this._getIntersection(mvpCorners[3], tempCulledCorner1.set(-0.95, -1, 0).applyMat4(mVPMatrix));

                // get intersection iterating from top right
                mvpCorners.push(this._getIntersection(mvpCorners[1], tempCulledCorner2.set(1, 0.95, 0).applyMat4(mVPMatrix)));
            }
            else if(clippedCorners[0] === 3) {
                // bottom left is culled
                // get intersection iterating from bottom right
                mvpCorners[3] = this._getIntersection(mvpCorners[2], tempCulledCorner1.set(0.95, -1, 0).applyMat4(mVPMatrix));

                // get intersection iterating from top left
                mvpCorners.push(this._getIntersection(mvpCorners[0], tempCulledCorner2.set( -1, 0.95, 0).applyMat4(mVPMatrix)));
            }
        }
        else if(clippedCorners.length === 2) {
            if(clippedCorners[0] === 0 && clippedCorners[1] === 1) {
                // top part of the plane is culled by near plane
                // find intersection using bottom corners
                mvpCorners[0] = this._getIntersection(mvpCorners[3], tempCulledCorner1.set(-1, -0.95, 0).applyMat4(mVPMatrix));
                mvpCorners[1] = this._getIntersection(mvpCorners[2], tempCulledCorner2.set( 1, -0.95, 0).applyMat4(mVPMatrix));
            }
            else if(clippedCorners[0] === 1 && clippedCorners[1] === 2) {
                // right part of the plane is culled by near plane
                // find intersection using left corners
                mvpCorners[1] = this._getIntersection(mvpCorners[0], tempCulledCorner1.set(-0.95, 1, 0).applyMat4(mVPMatrix));
                mvpCorners[2] = this._getIntersection(mvpCorners[3], tempCulledCorner2.set(-0.95, -1, 0).applyMat4(mVPMatrix));
            }
            else if(clippedCorners[0] === 2 && clippedCorners[1] === 3) {
                // bottom part of the plane is culled by near plane
                // find intersection using top corners
                mvpCorners[2] = this._getIntersection(mvpCorners[1], tempCulledCorner1.set(1, 0.95, 0).applyMat4(mVPMatrix));
                mvpCorners[3] = this._getIntersection(mvpCorners[0], tempCulledCorner2.set(-1, 0.95, 0).applyMat4(mVPMatrix));
            }
            else if(clippedCorners[0] === 0 && clippedCorners[1] === 3) {
                // left part of the plane is culled by near plane
                // find intersection using right corners
                mvpCorners[0] = this._getIntersection(mvpCorners[1], tempCulledCorner1.set(0.95, 1, 0).applyMat4(mVPMatrix));
                mvpCorners[3] = this._getIntersection(mvpCorners[2], tempCulledCorner2.set(0.95, -1, 0).applyMat4(mVPMatrix));
            }
        }
        else if(clippedCorners.length === 3) {
            // get the corner that is not clipped
            let nonClippedCorner = 0;
            for(let i = 0; i < corners.length; i++) {
                if(!clippedCorners.includes(i)) {
                    nonClippedCorner = i;
                }
            }

            // we will have just 3 corners so reset our mvpCorners array with just the visible corner
            mvpCorners = [
                mvpCorners[nonClippedCorner]
            ];
            if(nonClippedCorner === 0) {
                // from top left corner to right
                mvpCorners.push(this._getIntersection(mvpCorners[0], tempCulledCorner1.set(-0.95, 1, 0).applyMat4(mVPMatrix)));
                // from top left corner to bottom
                mvpCorners.push(this._getIntersection(mvpCorners[0], tempCulledCorner2.set(-1, 0.95, 0).applyMat4(mVPMatrix)));
            }
            else if(nonClippedCorner === 1) {
                // from top right corner to left
                mvpCorners.push(this._getIntersection(mvpCorners[0], tempCulledCorner1.set(0.95, 1, 0).applyMat4(mVPMatrix)));
                // from top right corner to bottom
                mvpCorners.push(this._getIntersection(mvpCorners[0], tempCulledCorner2.set(1, 0.95, 0).applyMat4(mVPMatrix)));
            }
            else if(nonClippedCorner === 2) {
                // from bottom right corner to left
                mvpCorners.push(this._getIntersection(mvpCorners[0], tempCulledCorner1.set(0.95, -1, 0).applyMat4(mVPMatrix)));
                // from bottom right corner to top
                mvpCorners.push(this._getIntersection(mvpCorners[0], tempCulledCorner2.set(1,-0.95, 0).applyMat4(mVPMatrix)));
            }
            else if(nonClippedCorner === 3) {
                // from bottom left corner to right
                mvpCorners.push(this._getIntersection(mvpCorners[0], tempCulledCorner1.set(-0.95, -1, 0).applyMat4(mVPMatrix)));
                // from bottom left corner to top
                mvpCorners.push(this._getIntersection(mvpCorners[0], tempCulledCorner2.set(-1 -0.95, 0).applyMat4(mVPMatrix)));
            }
        }
        else {
            // all 4 corners are culled! artificially apply wrong coords to force plane culling
            for(let i = 0; i < corners.length; i++) {
                mvpCorners[i][0] = 10000;
                mvpCorners[i][1] = 10000;
            }
        }

        return mvpCorners;
    }
Get intersection points between a plane and the camera near plane
     When a plane gets clipped by the camera near plane, the clipped corner projected coords returned by _applyMat4() are erronate
     We need to find the intersection points using another approach
     Here I chose to use non clipped corners projected coords and a really small vector parallel to the plane's side
     We're adding that vector again and again to our corner projected coords until the Z coordinate matches the near plane: we got our intersection

     params:
     @corners (array): our original corners vertices coordinates
     @mvpCorners (array): the projected corners of our plane
     @clippedCorners (array): index of the corners that are clipped

     returns:
     @mvpCorners (array): the corrected projected corners of our plane
*