Materials: Fixed animation of layer and decoration stages

The interpolation point between the current and next stage was not
calculated correctly.