compositor AO/SSAO
{
    technique
    {	
        //texture_ref geom AO/MRT mrt_output
        texture scene target_width target_height PF_R8G8B8A8
        texture ssao target_width target_height PF_R8G8B8A8
        texture ssaoBlurX target_width target_height PF_R8G8B8A8
        texture ssaoBlurY target_width target_height PF_R8G8B8A8

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

        target ssao
        {
            input none

 
            pass render_quad
            {
                // our SSAO listener number
                identifier 42

                material ssao
                // pass in the "geometry map"
                //input 0 geom 1
            }
        }

        target ssaoBlurX
        {
            input none

            pass clear
            {
            }

            pass render_quad
            {
                identifier 43

                material ssaoBlurX
                input 0 ssao
                //input 1 geom 1
            }
        }

        target ssaoBlurY
        {
            input none

            pass clear
            {
            }

            pass render_quad
            {
                identifier 43

                material ssaoBlurY
                input 0 ssaoBlurX
                //input 1 geom 1
            }
        }



        target_output
        {
            input none

            pass render_quad
            {
                // just output something, for example, use a modulate
                // material to just multiply the scene by the ssao
                material modulate
                //input 0 scene
                input 0 ssaoBlurY		// Final SSAO
                //input 0 ssao			// Non-blurred SSAO texture
            }
        }
    }
}

compositor AO/SSAOBlank
{
    technique
    {	
        //texture_ref geom AO/MRT mrt_output
        texture scene target_width target_height PF_R8G8B8A8
        texture ssao target_width target_height PF_R8G8B8A8
        texture ssaoBlurX target_width target_height PF_R8G8B8A8
        texture ssaoBlurY target_width target_height PF_R8G8B8A8

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

        target ssao
        {
            input none

 
            pass render_quad
            {
                // our SSAO listener number
                identifier 42

                material ssao
                // pass in the "geometry map"
                //input 0 geom 1
            }
        }

        target ssaoBlurX
        {
            input none

            pass clear
            {
            }

            pass render_quad
            {
                identifier 43

                material ssaoBlurX
                input 0 ssao
                //input 1 geom 1
            }
        }

        target ssaoBlurY
        {
            input none

            pass clear
            {
            }

            pass render_quad
            {
                identifier 43

                material ssaoBlurY
                input 0 ssaoBlurX
                //input 1 geom 1
            }
        }



        target_output
        {
            input none

            pass render_quad
            {
                // just output something, for example, use a modulate
                // material to just multiply the scene by the ssao
                material blank
                //input 0 scene
                input 0 ssaoBlurY		// Final SSAO
                //input 0 ssao			// Non-blurred SSAO texture
            }
        }
    }
}
