Open Knand1861 opened 2 years ago
The issue is that per-instance uniforms (and likely global uniforms) aren't implemented for use in 2D (canvas_item
) shaders yet. They only work with 3D (spatial
) shaders.
As per the other linked issues, can you test this in a 3D (spatial
) shader instead of a 2D (canvas_item
) shader?
I wonder if this is connected to the recent shader caching issues. It would explain why it works after deleting the shader and rewriting it on subsequent loads
Godot version
4.11 alpha
System information
Windows 11
Issue description
If I declare a global uniform in the shader script, project crashes on next loading; WORKAROUND: deleting the declaration with notepad directly in .tres file before launch and then retyping it again, once loaded. [they work fine during the session (yes, I added global in project settings)]
Steps to reproduce
Minimal reproduction project
No response