Creating a delay function in the material.

I made a full example