0 votes

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?

Godot version 3.2.3
in Engine by (23 points)

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

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.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.