Пример #1
0
        public void OnResize(UInt32 width, UInt32 height)
        {
            var RHICtx = EngineNS.CEngine.Instance.RenderContext;

            if (RHICtx == null)
            {
                return;
            }

            //mCamera.PerspectiveFovLH(mCamera.mDefaultFoV, (float)width, (float)height, -1, -1);

            mHitProxyView.OnResize(RHICtx, null, width, height);

            mViewportSizeX = width;
            mViewportSizeY = height;

            //var HitProxyTex = mHitProxyView.FrameBuffer.GetSRV_RenderTarget(0);
            //HitProxyTex.GetTexture2DData(RHICtx, mHitProxyCPUTexture, 0, (int)mViewportSizeX, (int)mViewportSizeY);
        }
Пример #2
0
        public void OnResize(UInt32 width, UInt32 height)
        {
            UInt32 TempWidth  = width;
            UInt32 TempHeight = height;

            mSV_PickedSetUp.OnResize(mRHICtx, null, width, height);
            mSV_PickedBlurH.OnResize(mRHICtx, null, width, height);
            mSV_PickedBlurV.OnResize(mRHICtx, null, width, height);

            mSE_PickedBlurH.mSRV_PickedSetUp  = mSV_PickedSetUp.FrameBuffer.GetSRV_RenderTarget(0);
            mSE_PickedBlurV.mSRV_PickedBlurH  = mSV_PickedBlurH.FrameBuffer.GetSRV_RenderTarget(0);
            mSE_PickedHollow.mSRV_PickedSetUp = mSV_PickedSetUp.FrameBuffer.GetSRV_RenderTarget(0);
            mSE_PickedHollow.mSRV_PickedBlur  = mSV_PickedBlurV.FrameBuffer.GetSRV_RenderTarget(0);

            var ViewportSizeAndRcp = new Vector4(TempWidth, TempHeight, 1.0f / TempWidth, 1.0f / TempHeight);

            mSV_PickedBlurH.ViewportSizeAndRcp = ViewportSizeAndRcp;
            mSV_PickedBlurV.ViewportSizeAndRcp = ViewportSizeAndRcp;
        }