Instead of animation, the gradient could be combined with background-position: fixed to create the effect of the shapes being a mask for an otherwise invisible background. Maybe add a border to the shapes since their background would blend together when they overlap.
The CSS Gradient Animator is a neat tool and the code is pretty compact. Here's a gist generated from the tool: https://gist.github.com/rupl/217cdf8a4db9523db508628d359dd565
Instead of animation, the gradient could be combined with
background-position: fixed
to create the effect of the shapes being a mask for an otherwise invisible background. Maybe add a border to the shapes since their background would blend together when they overlap.