Combining compositors in code

In the last two examples, we have seen how we can create more complex compositors by combining several render steps with different materials. We had to write a new compositor script to combine several render steps, even though we already had two compositors, each one describing one half of the final effect. Wouldn't it be nice to combine these two compositors to create the final effect without the need to write a new compositor script each time we want to combine some compositors? This is exactly what we are going to accomplish in the next example: making use of the compositor chain.

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.