-
-
Notifications
You must be signed in to change notification settings - Fork 24.6k
Description
Tested versions
Reproducible in 4.7-dev1, 4.6.1-stable, 4.5.1-stable
System information
Godot v4.6.1.stable - Windows 11 (build 26200) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 (NVIDIA; 32.0.15.9579) - AMD Ryzen 5 7600X 6-Core Processor (12 threads) - 31.08 GiB memory
Issue description
When adding or removing a shader material that uses a shader with instance uniforms to a node, the Instance Shader Parameters section of the inspector doesn't immediately update. The instance uniforms don't appear when adding the material, and don't disappear when removing it if they were already there. Instead, you need to force the inspector to update by for example deselecting and then reselecting the node (so that the inspector is recreated)
If the material is set in material_override, then adding or removing the shader in the material resource does correctly update the instance uniform parameters, and they also update as expected when editing the shader code. This doesn't work if the material is set in material_overlay, in surface material overlay on a mesh instance, or in the mesh itself.
Steps to reproduce
- Create a shader resource (can be textual or visual) that contains at least one
instance uniform - Create a material using the shader
- Create a geometry instance, such as a MeshInstance3D
- Assign the material to the node. Observe how the Instance Shader Parameters section of GeometryInstance3D doesn't appear
- Deselect the node and then select it again. Observe how Instance Shader Parameters has appeared now
- Remove the material from the node. Observe how the Instance Shader Parameters is still there
- Deselect the node and then select it again. Observe how Instance Shader Parameters has disappeared now