This example shows how to use the Reduction pipeline with material casting.