// Update is called once per frame void Update() { //if (Input.GetKeyDown(KeyCode.I)) //{ // Debug.Log("Started Capturing render @" + Time.timeSinceLevelLoad); // //testRenderTexture = RenderTexture.GetTemporary(testTexture.width, testTexture.height, 24); // mainCam = Camera.main; // //Capture(ref LastRenderTexture, mainCam); // Debug.Log("Ended Capturing render @" + Time.timeSinceLevelLoad); //} //if (Input.GetKeyDown(KeyCode.O)) //{ // //transitionEffect.DoOverride = !transitionEffect.DoOverride; // StartPhaseDissolve(); //} if (isPhasing) { if (transitionMode == TransitionMode.Dissolve) { Phasing(); } else if (transitionMode == TransitionMode.Particle) { PhasingParticle(); } } //delayed capturing if (delayedCampturingFramesToWait == 0) { mainCam.cullingMask = layerDefault; transitionEffect.Capture(ref NowSceneRenderTexture, mainCam); transitionEffect.SetGPU(LastSceneRenderTexture, NowSceneRenderTexture, mainCam); mainCam.cullingMask = particleLayer; Start2PhaseParticle(); } if (delayedCampturingFramesToWait >= 0) { delayedCampturingFramesToWait--; } }