void IPool.OnGet(params object[] args)
 {
     try
     {
         var width = (int)args[0];
         var high  = (int)args[1];
         RenderTexture = RenderTextureHelper.GetRT(width, high);
     }
     catch (Exception)
     {
         RenderTexture = null;
     }
 }
Ejemplo n.º 2
0
        protected override void OnAddCommandBuffer()
        {
            base.OnAddCommandBuffer();
            var camera = _postProcessCamera.Camera;

            if (!camera)
            {
                return;
            }
            var w = camera.pixelWidth;
            var h = camera.pixelHeight;

            _renderTexture = RenderTextureHelper.GetRT(w, h);
        }
Ejemplo n.º 3
0
 protected override void OnRemoveCommandBuffer()
 {
     base.OnRemoveCommandBuffer();
     RenderTextureHelper.ReleaseRT(_renderTexture);
 }
 private void ReleaseRT()
 {
     RenderTextureHelper.ReleaseRT(RenderTexture);
     RenderTexture = null;
 }