Source

ogre-ssao / media / ssao / ssao_with_debug.compositor

Full commit
compositor SSAO/DebugCompositor
{
    technique
    {
        texture GBuffer target_width target_height PF_FLOAT32_RGBA

        texture scene target_width target_height PF_R8G8B8A8
		texture ssao target_width target_height PF_R8G8B8A8
        texture final target_width target_height PF_R8G8B8A8

        // the scene we want to modulate
        target scene
        {
            input previous
        }


        // fill up geometry buffer (normalized depth & normals)
        target GBuffer
        {
            input none
            material_scheme geom

            pass clear
            {
            }

            pass render_scene
            {
            }
        }

        target ssao
        {
            input none

            pass clear
            {
            }

            pass render_quad
            {
                // our SSAO listener number
                identifier 42

                material SSAO/rgba_iq/ssao
                input 0 GBuffer
            }
        }

   

		target final
		{
            input none

            pass render_quad
            {
                // just output something, for example, use a modulate
                // material to just multiply the scene by the ssao
                material SSAO/rgba_iq/Combine
                input 0 scene
                input 1 ssao
            }
        }


        target_output
        {
			input none

			pass render_quad
			{
				material debug_view
				input 0 GBuffer
				input 1 ssao
				input 2 scene
				input 3 final
			}
		}
    }
}