Exemplo n.º 1
0
        /// <summary>
        /// Constructs a <see cref="MasterRenderer"/>.
        /// </summary>
        /// <param name="device">The graphics device which should already be initialized.</param>
        /// <param name="content">The content manager which should already be initialized.</param>
        public MasterRenderer(GraphicsDevice device, ContentManager content)
        {
            mGraphicsDevice = device;

            var depthStencilState = new DepthStencilState
            {
                StencilEnable       = false,
                DepthBufferFunction = CompareFunction.LessEqual
            };

            mGraphicsDevice.DepthStencilState = depthStencilState;

            mQuad = new Quad(device);

            mForwardRenderer         = new ForwardRenderer(device, content, ForwardShaderPath, ForwardSkinnedShaderPath, ForwardTerrainShaderPath);
            mPostProcessRenderer     = new PostProcessRenderer(device, content, PostProcessShaderPath);
            mShadowRenderer          = new ShadowRenderer(device, content, ShadowShaderPath, ShadowSkinnedShaderPath);
            mFxaaRenderer            = new FxaaRenderer(device, content, FxaaShaderPath);
            mSkyRenderer             = new SkyRenderer(device, content, SkyShaderPath);
            mPrePassRenderer         = new PrePassRenderer(device, content, PrePassShaderPath);
            mBloomRenderer           = new BloomRenderer(device, content, BloomShaderPath);
            mGrassRenderer           = new GrassRenderer(device, content, GrassShaderPath);
            mBoundingRectRenderer    = new BoundingRectangleRenderer(device);
            mVisibilityGraphRenderer = new VisibilityGraphRenderer(device);
        }
        /// <summary>
        /// Constructs a <see cref="MasterRenderer"/>.
        /// </summary>
        /// <param name="device">The graphics device which should already be initialized.</param>
        /// <param name="content">The content manager which should already be initialized.</param>
        public MasterRenderer(GraphicsDevice device, ContentManager content)
        {
            mGraphicsDevice = device;

            mQuad = new Quad(device);

            mForwardRenderer     = new ForwardRenderer(device, content, ForwardShaderPath);
            mPostProcessRenderer = new PostProcessRenderer(device, content, PostProcessShaderPath);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Constructs a <see cref="MasterRenderer"/>.
        /// </summary>
        /// <param name="device">The graphics device which should already be initialized.</param>
        /// <param name="content">The content manager which should already be initialized.</param>
        public MasterRenderer(GraphicsDevice device, ContentManager content)
        {
            mGraphicsDevice = device;

            var depthStencilState = new DepthStencilState();

            depthStencilState.StencilEnable = false;

            mGraphicsDevice.DepthStencilState = depthStencilState;

            mQuad = new Quad(device);

            mForwardRenderer     = new ForwardRenderer(device, content, ForwardShaderPath);
            mPostProcessRenderer = new PostProcessRenderer(device, content, PostProcessShaderPath);
            mShadowRenderer      = new ShadowRenderer(device, content, ShadowShaderPath);
            mFxaaRenderer        = new FxaaRenderer(device, content, FxaaShaderPath);
        }