void CameraGenerateFadeTargets(bool isReversed, Camera cam, Camera camEnd, Camera[] allCams, float[] parameters)
        {
            AMCameraFade cf = AMCameraFade.getCameraFade();

            cf.incrementKeepAlives(true);

            if (cf.keepAliveColor)
            {
                cf.keepAliveColor = false;
            }
            cf.isReset = false;

            Camera firstCamera  = null;
            Camera secondCamera = null;
            Color? firstColor   = null;
            Color? secondColor  = null;

            if (isReversed)
            {
                if (camEnd)
                {
                    firstCamera = camEnd;
                }
                else if (typeEnd == 1)
                {
                    firstColor = colorEnd;
                }
                if (cam)
                {
                    secondCamera = cam;
                }
                else if (type == 1)
                {
                    secondColor = color;
                }
            }
            else
            {
                if (cam)
                {
                    firstCamera = cam;
                }
                else if (type == 1)
                {
                    firstColor = color;
                }
                if (camEnd)
                {
                    secondCamera = camEnd;
                }
                else if (typeEnd == 1)
                {
                    secondColor = colorEnd;
                }
            }
            // setup first target
            if (firstCamera)
            {
                // camera
                if (!still)
                {
                    cf.setupRenderTexture(firstCamera);
                }
                else
                {
                    AMUtil.SetTopCamera(firstCamera, allCams);
                    firstCamera.Render();
                    cf.refreshScreenTex();
                    cf.useRenderTexture = false;
                    cf.hasColorTex      = false;
                }
            }
            else
            {
                // color
                cf.colorTex    = (Color)firstColor;
                cf.hasColorTex = true;
            }
            // setup second target
            if (secondCamera)
            {
                // camera
                AMUtil.SetTopCamera(secondCamera, allCams);
                cf.hasColorBG = false;
            }
            else
            {
                // color
                cf.colorBG    = (Color)secondColor;
                cf.hasColorBG = true;
            }
            // iris shape
            if (irisShape)
            {
                cf.irisShape = irisShape;
                //cf.setupMaterials();
            }
            cf.mode = cameraFadeType;
            // setup camera fade
            cf.setupMaterials();
            cf.r       = parameters;
            cf.value   = 1f;
            cf.percent = 0f;
        }