Time for action — adding a compositor

This is going to be our first compositor. We will use the scene and prepare to see its effect.

  1. 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
    {
    }
    }
    }
    }
    
  2. Next, create a new file for storing our compositor scripts. In the same directory as the material file, create a file named Ogre3DBeginnersGuide.compositor.
  3. In this file, define our compositor using the same scheme as we did for materials:
    compositor Compositor1
    {
    technique
    {
    
  4. Next, define a target where our scene is rendered to before we can modify it:
    texture scene target_width ...

Get Ogre 3D 1.7 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.