// 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 GreenBloom
{
    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/GreenBloomBlend
                input 0 rt1
            }
        }
    }
}
