// Manuel's bloom
// Needs a scene-sized rtt, but does only one render of the scene
compositor Bloom
{
    technique
    {
        // Temporary textures
        texture rt0 128 128 PF_A8R8G8B8
        texture rt1 128 128 PF_A8R8G8B8

        target rt1
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target rt0
        {
            // Start with clear texture
            input none
            // Vertical blur pass
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/Blur0
                input 0 rt1
            }
        }

        target rt1
        {
            // Start with clear texture
            input none
            // Horizontal blur pass
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/Blur1
                input 0 rt0
            }
        }

        target_output
        {
            // Start with clear output
            input previous
            // Draw a fullscreen quad
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/BloomBlend
                input 0 rt1
            }
        }
    }
}

compositor Glass
{
    technique
    {
        texture rt0 target_width target_height PF_R8G8B8

        target rt0 { input previous }

        target_output
        {
            // Start with clear output
            input none

            pass render_quad
            {
                material Ogre/Compositor/GlassPass
                input 0 rt0
            }
        }
    }
}

// Black and white effect
compositor BW
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target_output
        {
            // Start with clear output
            input none
            // Draw a fullscreen quad with the black and white image
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/BlackAndWhite
                input 0 rt0
            }
        }
    }
}

compositor Tiling
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target_output
        {
            // Start with clear output
            input none
            // Draw a fullscreen quad with the black and white image
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/Tiling
                input 0 rt0
            }
        }
    }
}

// Embossed (fake bump) effect
compositor Embossed
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target_output
        {
            // Start with clear output
            input none
            // Draw a fullscreen quad with the black and white image
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/Embossed
                input 0 rt0
            }
        }
    }
}

compositor Sharpen Edges
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target_output
        {
            // Start with clear output
            input none
            // Draw a fullscreen quad with the black and white image
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/SharpenEdges
                input 0 rt0
            }
        }
    }
}

compositor Invert
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target_output
        {
            // Start with clear output
            input none
            // Draw a fullscreen quad with the black and white image
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/Invert
                input 0 rt0
            }
        }
    }
}

compositor Posterize
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target_output
        {
            // Start with clear output
            input none
            // Draw a fullscreen quad with the black and white image
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/Posterize
                input 0 rt0
            }
        }
    }
}

compositor Laplace
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target_output
        {
            // Start with clear output
            input none
            // Draw a fullscreen quad with the black and white image
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/Laplace
                input 0 rt0
            }
        }
    }
}

compositor "Old TV"
{
    technique
    {
        texture rt0 target_width target_height PF_R8G8B8

        // render scene to a texture
        target rt0 { input previous }

        target_output
        {
            // Start with clear output
            input none

            pass render_quad
            {
                // convert the previous render target to a black and white image, add some noise, distort it,
                // then render to scene aligned quad
                material Ogre/Compositor/OldTV
                input 0 rt0
            }
        }
    }
}

compositor Old Movie
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target_output
        {
            // Start with clear output
            input none
            // Draw a fullscreen quad with the black and white image
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/OldMovie
                input 0 rt0
            }
        }
    }
}

compositor Gaussian Blur
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8
        texture rt1 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target rt1
        {
            // Blur horizontally
            input none
            pass render_quad
            {
                material Ogre/Compositor/HDR/GaussianBloom
                input 0 rt0
                identifier 700
            }
        }

        target_output
        {
            // Start with clear output
            input none
            // Blur vertically
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/HDR/GaussianBloom
                input 0 rt1
                identifier 701
            }
        }
    }
}

compositor Radial Blur
{
    technique
    {
        // Temporary textures
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {
            // Render output from previous compositor (or original scene)
            input previous
        }

        target_output
        {
            // Start with clear output
            input none
            // Blur vertically
            pass render_quad
            {
                // Renders a fullscreen quad with a material
                material Ogre/Compositor/Radial_Blur
                input 0 rt0
            }
        }
    }
}
