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;
     }
 }
Example #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);
        }