How can I make a vertex shader on a button apply to text pixels rather than letters?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By RitzyMage

When applying a vertex shader to a button (e.g. just create a default Button with text), the shader seems to move the letters instead of the pixels. Here is an example that shows what I mean:

 void vertex() {
      float offset_x = cos(TIME)*10.0 + UV.x * 100.0 * cos(TIME);
      float offset_y = sin(TIME)*10.0 + UV.y * 100.0 * sin(TIME);
      VERTEX += vec2(offset_x, offset_y);
   }

Instead of swirling the whole button, this moves the letters individually. How do I change the shader or the button to make the pixels move rather than the letters?

Are you trying to move the pixels that make up the button, or the text on the button?

Ertain | 2021-07-15 00:36

I’m trying to move each pixel of the button and want the text to be treated the same as other pixels. Right now this code moves each letter in a weird way whereas I’d like the letters to move as if they were a part of the background image.

RitzyMage | 2021-07-15 18:09