Esempio n. 1
0
        public void Render(DXManager dxman, float elapsed)
        {
            ElapsedTime = elapsed;

            var context = dxman.context;

            if (Multisampled)
            {
                int sr = 0;// D3D11CalcSubresource(0, 0, 1);
                context.ResolveSubresource(Primary.TextureMS, sr, Primary.Texture, sr, Format.R32G32B32A32_Float);
            }

            context.OutputMerger.SetRenderTargets((RenderTargetView)null);

            ProcessLuminance(context);
            ProcessBloom(context);

            dxman.SetDefaultRenderTarget(context);
            context.OutputMerger.SetBlendState(BlendState, null, 0xFFFFFFFF);
            FinalPass(context);
        }
Esempio n. 2
0
        public void Render(DXManager dxman, float elapsed, DeferredScene defScene)
        {
            ElapsedTime = elapsed;
            DefScene    = defScene;
            UsePrimary  = ((defScene?.SSAASampleCount ?? 2) > 1) || (defScene?.SceneColour == null);

            var context = dxman.context;

            if (Multisampled && UsePrimary)
            {
                int sr = 0;// D3D11CalcSubresource(0, 0, 1);
                context.ResolveSubresource(Primary.TextureMS, sr, Primary.Texture, sr, Format.R32G32B32A32_Float);
            }

            context.OutputMerger.SetRenderTargets((RenderTargetView)null);

            ProcessLuminance(context);
            ProcessBloom(context);

            dxman.SetDefaultRenderTarget(context);
            context.OutputMerger.SetBlendState(BlendState, null, 0xFFFFFFFF);
            FinalPass(context);
        }