This is going to be our first compositor. We will use the scene and prepare to see its effect.
We need a new material for this, which does nothing at the moment. Add this new material in the material file that we previously used and name it
Ogre3DBeginnersGuide/Comp1:
material Ogre3DBeginnersGuide/Comp1 { technique { pass { texture_unit { } } } }
Next, create a new file for storing our compositor scripts. In the same directory as the material file, create a file named
Ogre3DBeginnersGuide.compositor
.In this file, define our compositor using the same scheme as we did for materials:
compositor Compositor1 { technique {
Next, define a target where our scene is rendered to before we can modify it:
texture scene target_width target_height PF_R8G8B8
Define the content of our target. In this case, it's the scene that was rendered before:
target scene { input previous }
The last step in the compositor script is to define the output:
target_output {
The compositor...