public override void OnResize(CRenderContext RHICtx, CSwapChain SwapChain, UInt32 width, UInt32 height) { Camera.PerspectiveFovLH(Camera.mDefaultFoV, (float)width, (float)height); mCopyPostprocessPass.mScreenView.OnResize(RHICtx, SwapChain, width, height); BaseSceneView.OnResize(RHICtx, null, width, height); //post effect; mMobileAO.OnResize(RHICtx, width, height, BaseSceneView); mBloomMobile.OnResize(RHICtx, width, height, BaseSceneView); mSunShaftMobile.OnResize(RHICtx, width, height); mCopySE.mBaseSceneView = BaseSceneView.FrameBuffer.GetSRV_RenderTarget(0); if (CEngine.EnableBloom == true) { mCopySE.mBloomTex = mBloomMobile.mUSView8.FrameBuffer.GetSRV_RenderTarget(0); } else { mCopySE.mBloomTex = BaseSceneView.FrameBuffer.GetSRV_RenderTarget(0); } mCopySE.mSunShaftTex = mSunShaftMobile.mView_Blur.FrameBuffer.GetSRV_RenderTarget(0); mCopySE.mSRV_MobileAo = mMobileAO.mView_AoMask.FrameBuffer.GetSRV_RenderTarget(0); var ViewportSizeAndRcp = new Vector4(width, height, 1.0f / width, 1.0f / height); mCopyPostprocessPass.mScreenView.ViewportSizeAndRcp = ViewportSizeAndRcp; }
public override void OnResize(CRenderContext RHICtx, CSwapChain SwapChain, UInt32 width, UInt32 height) { if (Camera == null || mBloomMobile.mUSView8 == null || BaseSceneView == null) { return; } SwapChain.OnResize(width, height); //RHICtx.BindCurrentSwapChain(mSwapChain); Camera.PerspectiveFovLH(Camera.mDefaultFoV, (float)width, (float)height); mCopyPostprocessPass.mScreenView.OnResize(RHICtx, SwapChain, width, height); BaseSceneView.OnResize(RHICtx, null, width, height); //hitproxy; mHitProxy.OnResize(width, height); //picked effect; mPickedEffect.OnResize(width, height); //post effect; mMobileAO.OnResize(RHICtx, width, height, BaseSceneView); mBloomMobile.OnResize(RHICtx, width, height, BaseSceneView); mSunShaftMobile.OnResize(RHICtx, width, height); mCopyEditorSE.mBaseSceneView = BaseSceneView.FrameBuffer.GetSRV_RenderTarget(0); mCopyEditorSE.mBloomTex = mBloomMobile.mUSView8.FrameBuffer.GetSRV_RenderTarget(0); mCopyEditorSE.mPickedTex = mPickedEffect.mSV_PickedBlurH.FrameBuffer.GetSRV_RenderTarget(0); mCopyEditorSE.mSunShaftTex = mSunShaftMobile.mView_Blur.FrameBuffer.GetSRV_RenderTarget(0); //mCopyEditorSE.mSRV_MobileAo = mMobileAO.mView_BlurV.FrameBuffer.GetSRV_RenderTarget(0); mCopyEditorSE.mSRV_MobileAo = mMobileAO.mView_AoMask.FrameBuffer.GetSRV_RenderTarget(0); var ViewportSizeAndRcp = new Vector4(width, height, 1.0f / width, 1.0f / height); BaseSceneView.mViewportSizeAndRcp = ViewportSizeAndRcp; mCopyPostprocessPass.mScreenView.ViewportSizeAndRcp = ViewportSizeAndRcp; }