Exemple #1
0
        void OnEnable()
        {
#if UNITY_EDITOR
            if (m_captureAudio && m_frameRateMode == FrameRateMode.Constant)
            {
                Debug.LogWarning("MP4Recorder: capture audio with Constant frame rate mode will cause desync");
            }
#endif
            m_shCopy = FrameCapturerUtils.GetFrameBufferCopyShader();
            m_outputDir.CreateDirectory();
            m_quad     = FrameCapturerUtils.CreateFullscreenQuad();
            m_mat_copy = new Material(m_shCopy);

            if (GetComponent <Camera>().targetTexture != null)
            {
                m_mat_copy.EnableKeyword("OFFSCREEN");
            }
        }
Exemple #2
0
 void Reset()
 {
     m_shCopy = FrameCapturerUtils.GetFrameBufferCopyShader();
 }