<!- In MeshInstance3D creating script in which it creates arraymesh of 1 triangle with all same sides 1. When shader is used to move vertexes vision messed up. Mesh becomes visible if looking at previous location before shader that moves VERTEXES was used, it becomes visible at new location only.
“When looking at new location mesh is not visible, only when looking at old location it becomes visible at new location.”* Any way to get rid of that, fix visibility?–>
My guess is that godot is culling it before it gets to the rendering stage. Something similar was happening for me and I realized that Godot must check if a mesh is in the bounds of the camera before rendering it, and if it isn’t then it culls it (i.e. doesn’t render it). The problem being that your shader moves the vertices around so that the mesh actually would end up in the camera. However the engine doesn’t know that since it is using the original world coordinates of that object before your shader does its vertex processing. A simple solution would be to set the mesh’s extra_cull_margin to something high. This value adds a large margin to the meshes bounding box (for culling purposes only) so that it doesn’t get culled so aggressively.