Esempio n. 1
0
 public void Dispose()
 {
     UnityHelpers.Destroy(this._m_work_texture);
     this._m_work_texture = null;
     if (this._m_vf_lip_material)
     {
         UnityHelpers.Destroy(this._m_vf_lip_material);
         this._m_vf_lip_material = null;
     }
 }
Esempio n. 2
0
        public void Flip(RenderTexture target)
        {
            if (this._m_work_texture == null ||
                this._m_work_texture.width != target.width ||
                this._m_work_texture.height != target.height)
            {
                UnityHelpers.Destroy(this._m_work_texture);
                this._m_work_texture = new RenderTexture(target.width,
                                                         target.height,
                                                         target.depth,
                                                         target.format,
                                                         RenderTextureReadWrite.Linear);
            }

            if (this._m_vf_lip_material)
            {
                Graphics.Blit(target, this._m_work_texture, this._m_vf_lip_material);
                Graphics.Blit(this._m_work_texture, target);
            }
        }