Description
Godot version
v4.2.beta1.mono.official [b137180]
System information
Godot v4.2.beta1.mono - Windows 10.0.19045 - Vulkan (Mobile) - dedicated Radeon RX 580 Series (Advanced Micro Devices, Inc.; 31.0.21031.1005) - Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 Threads)
Issue description
Ported project over from v4.1.2.stable.mono.official [399c9dc] to v4.2.beta1.mono.official [b137180] and noticed that my shader was not working as expected. It has a number of instance uniforms to control Color, Texture, and UVs.
I noticed that once I removed the "instance" keyword, the shader rendered correctly, but I lost the ability to use instance uniforms.
The "Instance Shader Parameters" are available under "GeometryInstance3D" as expected, but the values don't seem to be used.
This appears to affect only the "Mobile" renderer. If I change the project to "Forward+", the instance uniforms work as expected.
Steps to reproduce
Create a New "ShaderMaterial"
Create a New "Shader" on the "ShaderMaterial" with the following code:
shader_type spatial;
instance uniform vec3 _color : source_color = vec3(0.0f);
void fragment() {
ALBEDO = _color.rgb;
}
Create a "MeshInstance3D", specify the Mesh as a "PlaneMesh" and apply the "ShaderMaterial" to the Material slot in the Mesh
Modify the Color value in the "Instance Shader Parameters" area under the "GeometryInstance3D" section. The color does not change as expected.
Remove the "instance" keyword and modify the Color under the "Shader Parameters" in the Material section. The color changes as expected.