Uniform arrays of mat4
type are set incorrectly when an Array of Transform3D is supplied
#64051
Labels
Milestone
Godot version
3b39f00
System information
Linux
Issue description
While you can set a
uniform mat4 x;
using aTransform3D
, you can't set auniform mat4 x[N];
using an Array ofTransform3D
s (the values visible to the shader will be corrupted / incorrect). Instead, currently you have to convert the Array ofTransform3D
s to a flattenedPackedFloat32Array
and use that as the parameter ofset_shader_param
.I think the reason might be that the conversion in this line doesn't work as expected:
godot/servers/rendering/renderer_rd/storage_rd/material_storage.cpp
Line 652 in 25915cd
Somewhat related: #63064
Steps to reproduce
Given this uniform:
This doesn't work (results in bad values in shader):
This works:
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: