Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shader uniform vec4 array shows as PackedFloat32Array, breaking future uniforms with the same name. #63064

Closed
nathanfranke opened this issue Jul 16, 2022 · 3 comments · Fixed by #76438 or #74937

Comments

@nathanfranke
Copy link
Contributor

nathanfranke commented Jul 16, 2022

Godot version

v4.0.alpha.custom_build [ae5668f]

System information

Arch on 5.18.11-arch1-1

Issue description

See reproduction steps, as it goes through more thoroughly

Steps to reproduce

  1. Make a shader with some working uniforms

    shader_type canvas_item;
    
    uniform vec3 my_array1[4];
    uniform vec3 my_array2[4];
    

    shader parameters

  2. Change one of them to a vec4 array:

    uniform vec4 my_array1[4];

    Array type changes to PackedFloat32Array which kinda makes sense, but the values are still Vec3
    image

  3. Rename it to my_array without the number and it changes to this:

    Since it's a new variable name, it's pretty much the expected behavior.

    image

  4. Change it back to a vec3 array:

    Same variable name so the bug happens. The type changes to PackedVector3Array but the values are still floats.

    image

Minimal reproduction project

(Right after step 1) test15.zip

@akien-mga
Copy link
Member

Reopening as #76438 was reverted.

@reptofrog
Copy link
Contributor

reptofrog commented Nov 12, 2023

I'm still running into this with 4.1.3

@TheDanDLion
Copy link

TheDanDLion commented Jan 6, 2024

i'm running into this on 4.2.1 stable.mono

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants