I’m trying to get a texture atlas to repeat a single texture. Currently, I am able to use a texture atlas to make the face of each brush the correct texture but with greedy meshing the texture gets stretched, I can fix the stretching by multiplying the UV by the face width when making the mesh but then the texture repeats to the rest of the textures in the atlas. Everything I find says to use shaders, but I don’t really understand how, and I could not find any provided examples.
Anyway, I figured it out. Godot right now doesn’t seem to support any sort of custom vertex data from what I could find outside the 4 built in CUSTOM0 - CUSTOM3 vertex colors. So I passed the row and column index through CUSTOM0 as a color and read it in the vertex function. Tada!
TBH I don’t really like this as a solution and wish Godot 4 had more options when it comes to SurfaceTool and custom vertex data for shaders but what can I do