godot icon indicating copy to clipboard operation
godot copied to clipboard

Shader array uniforms dont always update in editor correctly

Open bud11 opened this issue 1 year ago • 1 comments

Godot version

4.0 stable

System information

Forward+ renderer, rx470

Issue description

Creating a uniform array in shader and then changing its value in inspector will lock the variable type for some reason

Steps to reproduce

  1. Create a shader with something like uniform vec3[10] whatever;
  2. Add something to the array
  3. Change the array to something else, maybe vec4
  4. Uniform will still show as vec3 in editor

seems to happen with all datatypes though, ive currently got it stuck on int array somehow even though it is clearly a vec4 reloading shader/scene/engine or even changing the variable name doesnt fix it, annoying

Minimal reproduction project

trivial recreation

bud11 avatar Mar 09 '23 20:03 bud11

I just looked into the scene file text and I think the issue stems from the lack of a PackedVector4Array type. PackedVector3 exists and works fine for vec3 if I edit the scene file to that but I cant make an equivalent edit for vec4

bud11 avatar Mar 10 '23 00:03 bud11

Reopening as #76438 was reverted.

akien-mga avatar Apr 28 '23 09:04 akien-mga