We don’t currently support uniform array in material plugins. This PR will add the support:
Once the PR is merged, this PG will work:
It defines an array of vec3 in the shader and use myColor[1] as the color filter (which I set to be (0,1,0) in bindForSubMesh).
Actually, you need to only specify name if you are sure that ubos won’t be used. We still need name because we need to collect the list of all uniform names, and it’s easier to get them from the ubo array than from the “fragment” string, that we would need to parse to extract those names.
No, it’s not possible, a material can’t have some of the settings managed by a ubo and some others not using the ubo.
Actually, you need to only specify name if you are sure that ubos won’t be used. We still need name because we need to collect the list of all uniform names, and it’s easier to get them from the ubo array than from the “fragment” string, that we would need to parse to extract those names.