Godot Version
4.4.1.stable
Question
I’m trying to change the values of an array in my shader to change the shader’s behavior when the player dies. What ends up happening is that the shader itself doesn’t react to it’s arrays being changed. Also, when I print the array in the same script that I modify it in, the values of it have changed, so it’s not that the values are overridden or something else like that.
On top of this, the shader does react to other modified non-array variables.
Is this just a bug or is there something I can do to fix it?
Code that modifies array:
var output_array = %ColorRect.get_material().get_shader_parameter("output_array")
output_array.set(0, Vector4(0.0,0.0,0.0,1.0))
Shader code defining variable.
uniform vec4 output_array[4];