Godot Version
4.3
Question
I have no idea what I am doing, and this shader is causing major lag on older systems. Could a wizard please assist me and explain this error?
bump
Unfortunately never found a solution.
This issue usually points to one of a few potential problems:
There might be duplicate node IDs in your visual shader graph.
You could be trying to add a node with an ID that’s already in use.
Alternatively, there might be a corrupted connection between nodes.
I’d recommend checking your shader graph for any duplicate IDs or invalid connections. If that doesn’t resolve it, you might need to rebuild the problematic part of the graph.
This look like a bug, i recommend report on Godot github
I was getting the same error on a built-in visual shader. Saving it as an external visual shader to the FileSystem then dragging it back into the Shader property resolved the issue.
The error is related to a caching issue in Godot’s Visual Shaders. If possible, try to isolate which shader is causing the problem. Once you have a suspect, remove it from your project while Godot is closed. Then, reopen the project, save it, and try running the game. If the problem persists, it may be caused by another shader. If it goes away, the one you removed was likely the issue.
After identifying the problematic shader, add it back to your project, open it in Godot, edit some small detail (to force the file to reload), and save the project. Then run the game again — this should resolve the error.
I believe this issue is already being tracked and is likely to be fixed in future versions of Godot.
I found a solution to make it go away, which was moving my shader/material onto the sprites/image rects I was using directly instead on their parents and having the children inherit the shader. This may however, not have been the direct fix and just caused the cache to be reloaded like another person mentioned.
EDIT:
Parenting it is fine, just deleting the shader and putting it back in the material works fine it seems
I have started using Terrain3D and when I am using my own textures, this error keeps showing 7 times every time I am running the scene.
ERROR: modules/visual_shader/visual_shader.cpp:939 - Condition “g->nodes.has(p_id)” is true.
Clicking the link takes me to a github page where the relevant lines 938 and 939 says this:
}
bool VisualShader::has_varying(const String &p_name) const {
return varyings.has(p_name);
}
What issue is Godot trying to communicate to me with this error?
The node has a p_id. Okay. Why is this a problem?