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.