Beispiel #1
0
        public async System.Threading.Tasks.Task <bool> Init(CRenderContext rc, CSwapChain SwapChain,
                                                             View.CGfxScreenViewDesc ViewInfo, CGfxShadingEnv ShadingEnv, RName MtlInst, string debugName)
        {
            mCmdList = new CCommandList[2];

            EngineNS.CCommandListDesc CmdListDesc = new EngineNS.CCommandListDesc();
            mCmdList[0]           = rc.CreateCommandList(CmdListDesc);
            mCmdList[1]           = rc.CreateCommandList(CmdListDesc);
            mCmdList[0].DebugName = debugName;
            mCmdList[1].DebugName = debugName;

            var ScreenAlignedTriangle = CEngine.Instance.MeshPrimitivesManager.GetMeshPrimitives(rc, CEngineDesc.ScreenAlignedTriangleName, true);

            mScreenAlignedTriangle = CEngine.Instance.MeshManager.CreateMesh(rc, ScreenAlignedTriangle);
            var mtl = await CEngine.Instance.MaterialInstanceManager.GetMaterialInstanceAsync(rc, MtlInst);

            mScreenAlignedTriangle.SetMaterialInstance(rc, 0,
                                                       mtl,
                                                       CEngine.Instance.PrebuildPassData.DefaultShadingEnvs);
            //await mScreenAlignedTriangle.AwaitEffects();

            mShadingEnv = ShadingEnv;
            mScreenView = new View.CGfxScreenView();
            return(await mScreenView.Init(rc, SwapChain, ViewInfo, ShadingEnv, mtl, mScreenAlignedTriangle));
        }
Beispiel #2
0
        public CGfxHitProxy()
        {
            var RHICtx = EngineNS.CEngine.Instance.RenderContext;

            mCLDB_HitProxy = new CCommandList[2];

            EngineNS.CCommandListDesc clDesc = new EngineNS.CCommandListDesc();
            mCLDB_HitProxy[0] = RHICtx.CreateCommandList(clDesc);
            mCLDB_HitProxy[1] = RHICtx.CreateCommandList(clDesc);
        }
        public CGfxMobileBloom(CRenderContext RHICtx)
        {
            mCmdListDB_Bloom = new CCommandList[2];

            EngineNS.CCommandListDesc CmdListDesc = new EngineNS.CCommandListDesc();
            mCmdListDB_Bloom[0] = RHICtx.CreateCommandList(CmdListDesc);
            mCmdListDB_Bloom[1] = RHICtx.CreateCommandList(CmdListDesc);

            mCmdListDB_Bloom[0].DebugName = "Bloom";
            mCmdListDB_Bloom[1].DebugName = "Bloom";
        }
        public CGfxCSMMobileEditor()
        {
            var RHICtx = EngineNS.CEngine.Instance.RenderContext;

            mCmdListDB_Shadow = new CCommandList[4, 2];
            EngineNS.CCommandListDesc CmdListDesc = new EngineNS.CCommandListDesc();
            for (UInt32 CmdIdx = 0; CmdIdx < 4; CmdIdx++)
            {
                mCmdListDB_Shadow[CmdIdx, 0] = RHICtx.CreateCommandList(CmdListDesc);
                mCmdListDB_Shadow[CmdIdx, 1] = RHICtx.CreateCommandList(CmdListDesc);
            }
        }
Beispiel #5
0
        public CGfxRP_Snapshot()
        {
            var RHICtx = EngineNS.CEngine.Instance.RenderContext;

            mCLDB_Snapshot = new CCommandList[2];
            EngineNS.CCommandListDesc CL_Desc = new EngineNS.CCommandListDesc();
            mCLDB_Snapshot[0] = RHICtx.CreateCommandList(CL_Desc);
            mCLDB_Snapshot[1] = RHICtx.CreateCommandList(CL_Desc);

            mCLDB_Copy    = new CCommandList[2];
            mCLDB_Copy[0] = RHICtx.CreateCommandList(CL_Desc);
            mCLDB_Copy[1] = RHICtx.CreateCommandList(CL_Desc);
        }
Beispiel #6
0
        public CGfxSSM()
        {
            var RHICtx = EngineNS.CEngine.Instance.RenderContext;

            mCmdListDB_Shadow = new CCommandList[2];

            EngineNS.CCommandListDesc CmdListDesc = new EngineNS.CCommandListDesc();
            mCmdListDB_Shadow[0] = RHICtx.CreateCommandList(CmdListDesc);
            mCmdListDB_Shadow[1] = RHICtx.CreateCommandList(CmdListDesc);

            mCmdListDB_Shadow[0].DebugName = "SSM_Shadow";
            mCmdListDB_Shadow[1].DebugName = "SSM_Shadow";
        }
        public CGfxPickedEffect()
        {
            mRHICtx = CEngine.Instance.RenderContext;

            EngineNS.CCommandListDesc CL_Desc = new EngineNS.CCommandListDesc();
            mCLDB_Picked    = new CCommandList[2];
            mCLDB_Picked[0] = mRHICtx.CreateCommandList(CL_Desc);
            mCLDB_Picked[1] = mRHICtx.CreateCommandList(CL_Desc);

            mCLDB_DisableWarning    = new CCommandList[2];
            mCLDB_DisableWarning[0] = mRHICtx.CreateCommandList(CL_Desc);
            mCLDB_DisableWarning[1] = mRHICtx.CreateCommandList(CL_Desc);
        }
Beispiel #8
0
        public CGfxFramePass(CRenderContext rc, string debugName)
        {
            mCmdList = new CCommandList[2];

            EngineNS.CCommandListDesc CmdListDesc = new EngineNS.CCommandListDesc();
            mCmdList[0] = rc.CreateCommandList(CmdListDesc);
            mCmdList[1] = rc.CreateCommandList(CmdListDesc);

            if (!string.IsNullOrEmpty(debugName))
            {
                mCmdList[0].DebugName = debugName;
                mCmdList[1].DebugName = debugName;
            }
        }
Beispiel #9
0
        public async System.Threading.Tasks.Task <bool> Init2(CRenderContext rc, CGfxShadingEnv ShadingEnv, RName MtlInst, View.CGfxScreenView view)
        {
            mCmdList = new CCommandList[2];

            EngineNS.CCommandListDesc CmdListDesc = new EngineNS.CCommandListDesc();
            mCmdList[0] = rc.CreateCommandList(CmdListDesc);
            mCmdList[1] = rc.CreateCommandList(CmdListDesc);

            var ScreenAlignedTriangle = CEngine.Instance.MeshPrimitivesManager.GetMeshPrimitives(rc, CEngineDesc.ScreenAlignedTriangleName, true);

            mScreenAlignedTriangle = CEngine.Instance.MeshManager.CreateMesh(rc, ScreenAlignedTriangle);
            var mtl = await CEngine.Instance.MaterialInstanceManager.GetMaterialInstanceAsync(rc, MtlInst);

            mScreenAlignedTriangle.SetMaterialInstance(rc, 0,
                                                       mtl,
                                                       CEngine.Instance.PrebuildPassData.DefaultShadingEnvs);

            mShadingEnv = ShadingEnv;
            mScreenView = view;
            return(true);
        }
Beispiel #10
0
        public CGfxMobileAO(CRenderContext RHICtx)
        {
            EngineNS.CCommandListDesc CmdListDesc = new EngineNS.CCommandListDesc();

            mCLDB_AoMask              = new CCommandList[2];
            mCLDB_AoMask[0]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_AoMask[1]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_AoMask[0].DebugName = "AoMask";
            mCLDB_AoMask[1].DebugName = "AoMask";

            mCLDB_BlurH              = new CCommandList[2];
            mCLDB_BlurH[0]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_BlurH[1]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_BlurH[0].DebugName = "AoMask_BlurH";
            mCLDB_BlurH[1].DebugName = "AoMask_BlurH";

            mCLDB_BlurV              = new CCommandList[2];
            mCLDB_BlurV[0]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_BlurV[1]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_BlurH[0].DebugName = "AoMask_BlurV";
            mCLDB_BlurH[1].DebugName = "AoMask_BlurV";
        }
Beispiel #11
0
        public CGfxSunShaftMobile(CRenderContext RHICtx)
        {
            mCLDB_SunShaft = new CCommandList[2];

            EngineNS.CCommandListDesc CmdListDesc = new EngineNS.CCommandListDesc();
            mCLDB_SunShaft[0]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_SunShaft[1]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_SunShaft[0].DebugName = "SunShaft";
            mCLDB_SunShaft[1].DebugName = "SunShaft";

            mCLDB_DisableWarning0              = new CCommandList[2];
            mCLDB_DisableWarning0[0]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_DisableWarning0[1]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_DisableWarning0[0].DebugName = "SunShaft_DisableWarning0";
            mCLDB_DisableWarning0[1].DebugName = "SunShaft_DisableWarning0";

            mCLDB_DisableWarning1              = new CCommandList[2];
            mCLDB_DisableWarning1[0]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_DisableWarning1[1]           = RHICtx.CreateCommandList(CmdListDesc);
            mCLDB_DisableWarning1[0].DebugName = "SunShaft_DisableWarning1";
            mCLDB_DisableWarning1[1].DebugName = "SunShaft_DisableWarning1";
        }