public override void TickLogic(CGfxSceneView view, CRenderContext RHICtx) { if (mCaptureSV == null) { return; } var rc = EngineNS.CEngine.Instance.RenderContext; if (rc == null) { return; } mCaptureSV.CookSpecRenderLayerDataToPass(rc, ERenderLayer.RL_Opaque, Camera, mCaptureSE, PrebuildPassIndex.PPI_SceneCapture); mCaptureSV.CookSpecRenderLayerDataToPass(rc, ERenderLayer.RL_CustomOpaque, Camera, mCaptureSE, PrebuildPassIndex.PPI_SceneCapture); mCaptureSV.CookSpecRenderLayerDataToPass(rc, ERenderLayer.RL_CustomTranslucent, Camera, mCaptureSE, PrebuildPassIndex.PPI_SceneCapture); mCaptureSV.CookSpecRenderLayerDataToPass(rc, ERenderLayer.RL_Translucent, Camera, mCaptureSE, PrebuildPassIndex.PPI_SceneCapture); mCaptureSV.CookSpecRenderLayerDataToPass(rc, ERenderLayer.RL_Gizmos, Camera, mCaptureSE, PrebuildPassIndex.PPI_SceneCapture); mCommandList_Final.BeginCommand(); mCommandList_Final.BeginRenderPass(mRenderPassDesc_SceneCapture, mCaptureSV.FrameBuffer); mCaptureSV.PushSpecRenderLayerDataToRHI(mCommandList_Final, ERenderLayer.RL_Opaque); mCaptureSV.PushSpecRenderLayerDataToRHI(mCommandList_Final, ERenderLayer.RL_CustomOpaque); mCaptureSV.PushSpecRenderLayerDataToRHI(mCommandList_Final, ERenderLayer.RL_CustomTranslucent); mCaptureSV.PushSpecRenderLayerDataToRHI(mCommandList_Final, ERenderLayer.RL_Translucent); mCaptureSV.PushSpecRenderLayerDataToRHI(mCommandList_Final, ERenderLayer.RL_Gizmos); mCommandList_Final.BuildRenderPass(int.MaxValue, false, true); mCommandList_Final.EndRenderPass(); mCommandList_Final.EndCommand(); }
public CPass TickLogic(CGfxCamera Camera, View.CGfxSceneView view, CRenderContext rc, int DPLimitter, bool GraphicsDebug) { var CmdList = CommitingCMDs; if (CmdList == null) { return(null); } using (var i = mLayerParameter.GetEnumerator()) { while (i.MoveNext()) { var parameter = i.Current.Value; mBaseSceneView.CookSpecRenderLayerDataToPass(rc, parameter.Layer, Camera, parameter.ShadingEnv, parameter.PassIndex); mBaseSceneView.PushSpecRenderLayerDataToRHI(CmdList, parameter.Layer); } } CmdList.BeginCommand(); CmdList.BeginRenderPass(mRenderPassDesc, mBaseSceneView.FrameBuffer); if (BeforeBuildRenderPass != null) { BeforeBuildRenderPass(Camera, view, rc, CmdList, DPLimitter, GraphicsDebug); } var LatestPass = CmdList.BuildRenderPass(DPLimitter, GraphicsDebug); if (AfterBuildRenderPass != null) { AfterBuildRenderPass(Camera, view, rc, CmdList, DPLimitter, GraphicsDebug); } CmdList.EndRenderPass(); CmdList.EndCommand(); return(LatestPass); }