How to draw gradient by mask

Hi @LedForm !

If you change your mask texture a bit, you can put animation information in there.
E.g. it’s common to encode “time” into a mask, encoded as a gradient from black to white.

You’d pass in a value to your shader, like “time” and use the gradient value to choose correct color in the shader.

Example using masks to animate stencil fades: