示例#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));
        }
示例#2
0
        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";
        }
示例#3
0
        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);
        }
示例#4
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;
            }
        }
示例#5
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);
        }
示例#6
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";
        }
示例#7
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";
        }