0 votes
uniform vec3 position;

void vertex() {
    float x = UV.x + position.x;

    VERTEX = vec3(VERTEX.x,VERTEX.y + sin(x) * 0.03 ,VERTEX.z);

I can't make this vertex shader work because the shader params are shared among all objects with the same material. I believe the solution is to create the shader at runtime but for better performance I'd like to do this for just this part of the shader.

in Engine by (42 points)

1 Answer

0 votes

If I remember correctly you just need to use "make unique" on the material. Click the drop-down menu next to the material in the inspector to find it.

by (1,120 points)
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.