Example #1
0
        public void Render(RenderTarget target, Camera camera, Scene scene)
        {
            mShader.mAlbedoMap  = target.mMainRenderTarget;
            mShader.mSaturation = scene.mPostProcessing.mSaturation;

            mShader.Apply();

            mDevice.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 4);
        }
Example #2
0
        public void Render(RenderTarget target, Camera camera, Scene scene)
        {
            /*
             * We don't want use the SpriteBatch class and should change to our own vertex structure
             * To improve this: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/Terrain_lighting.php
             * Some further resources: https://docs.microsoft.com/en-us/previous-versions/windows/silverlight/dotnet-windows-silverlight/bb199731%28v%3dxnagamestudio.35%29
             * and: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/VertexBuffer_and_IndexBuffer.php
             */

            mShader.mAlbedoMap  = target.mMainRenderTarget;
            mShader.mSaturation = scene.mPostProcessing.mSaturation;

            mShader.Apply();

            mDevice.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 4);
        }
        public void Render(RenderTarget target, Camera camera, Scene scene)
        {
            mShader.mAlbedoMap = target.mMainRenderTarget;

            mShader.mBloomPasses = scene.mPostProcessing.mBloom.mPasses;
            mShader.mBloom1      = target.mBloomRenderTarget1Vertical;
            mShader.mBloom2      = target.mBloomRenderTarget2Vertical;
            mShader.mBloom3      = target.mBloomRenderTarget3Vertical;
            mShader.mBloom4      = target.mBloomRenderTarget4Vertical;
            mShader.mBloom5      = target.mBloomRenderTarget5Vertical;

            mShader.mSaturation = scene.mPostProcessing.mSaturation;

            mShader.Apply();

            mDevice.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 4);
        }