Exemplo n.º 1
0
    private void OnPostRender()
    {
        RenderTexture.active = _lensCorrenction.LensTexture;

#if READ_PIX_DEBUG
        // デバッグ
        _encoder.OnPostRender();
#else
        if (this.IsPlay)
        {
            // クライアントが一定以上遅れたので、1度待つ
            if (_waitClient)
            {
                // 一定以下になるまでクライアントを待つ。
                if (this.DelayFrame <= 2)
                {
                    _waitClient = false;
                }
            }
            else
            {
                if (this.DelayFrame > _allowableDelay)
                {
                    _waitClient = true;
                }

                _encoder.OnPostRender();
            }
        }
#endif
    }