We need a new compositor, material, and fragment shader:
The compositor script itself is nothing special. We need one texture for the scene and then directly use this texture as input for the output, which uses one material:
compositor Compositor7 { technique { texture scene target_width target_height PF_R8G8B8 target scene { input previous } target_output { input none pass render_quad { material Ogre3DBeginnersGuide/Comp5 input 0 scene } } } }
The material itself is also nothing new; just add a fragment shader like always:
material Ogre3DBeginnersGuide/Comp5 { technique { pass { fragment_program_ref MyFragmentShader8 { } texture_unit { } } } }
Don't forget to add the definition of the fragment shader before using it in the material:
Now to the interesting part. In the fragment shader, the header hasn't changed since the...