Ejemplo n.º 1
0
        public void OnResize(CRenderContext RHICtx, UInt32 width, UInt32 height, CGfxSceneView BaseSceneView)
        {
            if (RHICtx == null || mView_AoMask == null || mView_BlurH == null /*|| mView_BlurV == null*/)
            {
                System.Diagnostics.Debug.Assert(false);
                return;
            }

            UInt32 Width  = Math.Max(width, 64);
            UInt32 Height = Math.Max(height, 64);

            UInt32 Width4  = Width / mRTCut;
            UInt32 Height4 = Height / mRTCut;

            mView_AoMask.OnResize(RHICtx, null, Width4, Height4);
            mView_BlurH.OnResize(RHICtx, null, Width4, Height4);
            //mView_BlurV.OnResize(RHICtx, null, Width4, Height4);

            //mSE_AoMask.mBaseSceneView = BaseSceneView.mFrameBuffer.GetSRV_RenderTarget(0);
            mSE_BlurH.mSRV_AoMask = mView_AoMask.FrameBuffer.GetSRV_RenderTarget(0);
            //mSE_BlurV.mSRV_Src = mView_BlurH.FrameBuffer.GetSRV_RenderTarget(0);

            mViewportSizeAndRcp             = new Vector4(Width4, Height4, 1.0f / Width4, 1.0f / Height4);
            mView_AoMask.ViewportSizeAndRcp = mViewportSizeAndRcp;
            mView_BlurH.ViewportSizeAndRcp  = mViewportSizeAndRcp;
            //mView_BlurV.ViewportSizeAndRcp = ViewportSizeAndRcp;
        }
Ejemplo n.º 2
0
        public void OnResize(CRenderContext RHICtx, UInt32 width, UInt32 height)
        {
            if (RHICtx == null || mView_Mask == null || mView_Blur == null)
            {
                System.Diagnostics.Debug.Assert(false);
                return;
            }

            UInt32 Width  = Math.Max(width, 4);
            UInt32 Height = Math.Max(height, 4);

            UInt32 Width4  = Width / 4;
            UInt32 Height4 = Height / 4;

            mView_Mask.OnResize(RHICtx, null, Width4, Height4);
            mView_Blur.OnResize(RHICtx, null, Width4, Height4);
        }
Ejemplo n.º 3
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;
        }
Ejemplo n.º 4
0
        public void OnResize(CRenderContext RHICtx, UInt32 width, UInt32 height, CGfxSceneView BaseSceneView)
        {
            if (RHICtx == null || mView_BlurH8 == null || mView_BlurV8 == null || mDSView16 == null || mDSView32 == null || mDSView64 == null || mUSView32 == null ||
                mUSView16 == null || mUSView8 == null)
            {
                Profiler.Log.WriteLine(Profiler.ELogTag.Error, "@Graphic", $"BloomError!!!", "");
                return;
            }

            UInt32 Width  = Math.Max(width, 64);
            UInt32 Height = Math.Max(height, 64);

            UInt32 Width8  = Width / 8;
            UInt32 Height8 = Height / 8;

            UInt32 Width16  = Width / 16;
            UInt32 Height16 = Height / 16;

            UInt32 Width32  = Width / 32;
            UInt32 Height32 = Height / 32;

            UInt32 Width64  = Width / 64;
            UInt32 Height64 = Height / 64;

            mView_BlurH8.OnResize(RHICtx, null, Width8, Height8);
            mView_BlurV8.OnResize(RHICtx, null, Width8, Height8);
            //down
            mDSView16.OnResize(RHICtx, null, Width16, Height16);
            mDSView32.OnResize(RHICtx, null, Width32, Height32);
            mDSView64.OnResize(RHICtx, null, Width64, Height64);
            //up;
            mUSView32.OnResize(RHICtx, null, Width32, Height32);
            mUSView16.OnResize(RHICtx, null, Width16, Height16);
            mUSView8.OnResize(RHICtx, null, Width8, Height8);

            mSE_BlurH.mBaseSceneView = BaseSceneView.FrameBuffer.GetSRV_RenderTarget(0);
            mSE_BlurV.mSrcTex        = mView_BlurH8.FrameBuffer.GetSRV_RenderTarget(0);

            //blur h
            {
                var ViewportSizeAndRcpBlurH = new Vector4(Width, Height, 1.0f / Width, 1.0f / Height);
                mView_BlurH8.ViewportSizeAndRcp = ViewportSizeAndRcpBlurH;
            }
            //blur v
            {
                var ViewportSizeAndRcpBlurV = new Vector4(Width8, Height8, 1.0f / Width8, 1.0f / Height8);
                mView_BlurV8.ViewportSizeAndRcp = ViewportSizeAndRcpBlurV;
            }
            {
                var ViewportSizeAndRcpD16 = new Vector4(Width8, Height8, 1.0f / Width8, 1.0f / Height8);
                mDSView16.ViewportSizeAndRcp = ViewportSizeAndRcpD16;
            }
            {
                var ViewportSizeAndRcpD32 = new Vector4(Width16, Height16, 1.0f / Width16, 1.0f / Height16);
                mDSView32.ViewportSizeAndRcp = ViewportSizeAndRcpD32;
            }
            {
                var ViewportSizeAndRcpD64 = new Vector4(Width32, Height32, 1.0f / Width32, 1.0f / Height32);
                mDSView64.ViewportSizeAndRcp = ViewportSizeAndRcpD64;
            }

            //up
            {
                var ViewportRcpU32 = new Vector4(1.0f / Width32, 1.0f / Height32, 1.0f / Width64, 1.0f / Height64);
                mUSView32.ViewportSizeAndRcp = ViewportRcpU32;
            }
            {
                var ViewportRcpU16 = new Vector4(1.0f / Width16, 1.0f / Height16, 1.0f / Width32, 1.0f / Height32);
                mUSView16.ViewportSizeAndRcp = ViewportRcpU16;
            }
            {
                var ViewportRcpU8 = new Vector4(1.0f / Width8, 1.0f / Height8, 1.0f / Width16, 1.0f / Height16);
                mUSView8.ViewportSizeAndRcp = ViewportRcpU8;
            }
        }