Modifying vertexes that don't exist via shader

Godot Version

4.2.1 stable

Question

I’m trying to create a shader that turns a solid block object (a rectangular prism) into a curtain-like object that has waves across its entire surface, so that it appears like a curtain. I’m attempting to do this via vertex shader because the map making software I’m using (trenchbroom) doesn’t do well with smooth curves.

The problem I’m running into is that I need more vertexes to modify to make the curtain wave. Because there are only vertexes on the corners, only the edges are being offset, rather than a pattern throughout. Is there any way to insert vertexes via the shader to be modified in the shader at regular intervals? Or is there another way to get a smooth wave like this?

Sounds like a job for a tessellation shader, which I don’t believe exists in Godot. I’d try using Blender to tessellate the mesh (add a bunch of vertices by subdividing the faces) then import that into Godot.

1 Like