-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Unable to get color data from an array of source_color type in shader. #76157
Comments
May be related to #76135 |
Not completely fixed by #74937. That PR will fix some conversions, but the problem here seems to be that the serialized
into
fixes things temporarily until next scene save. I checked with a debugger and the type is correct most of the way (PACKED_COLOR_ARRAY), but in the end it is serialized and then loaded as generic Variant::Type::ARRAY containing variant Color objects (which is not the same as PACKED_COLOR_ARRAY), which will not convert properly into a vec4 uniform field (due to Variant conversion rules). I'll dig in some more and comment later. |
Updated #74937 to fully fix this issue, at least for now. |
Godot version
v4.1.dev.custom_build.a7276f1ce
System information
Win10, AMD 2600, GeForce GTX 1060, Vulkan API 1.3.205
Issue description
I can't get correct color data from an array of source_color type.
The color data is saved as Color in the file:
shader_parameter/palette = [Color (1, 0, 0, 1), Color (0, 1, 0, 1), Color (0, 0, 1, 1)]
Shouldn't it be saved as PackedColorArray?
Steps to reproduce
1.Declare an array of source_color type.
2.Set colors.
Minimal reproduction project
shadertest.zip
The text was updated successfully, but these errors were encountered: