Custom Material Cant bind float Arrays?

I have tried a ton of ways to get this float array to bind correct.
Is there something I am doing wrong?

After figuring out that the array is not binding in the initial setting, I tried on the effect and it started giving me a weird error.

The effect is not necessarily ready when onEffectCreatedObservable is called. You should poll for effect.isReady() to be true before calling setFloatArray.

But as this uniform won’t be part of an ubo, you’d have to bind the value every time the material is used, so it’s better to use the onBindObservable event for this :

1 Like

If this value never changes would it be better to just hardcode it into the shader?

Yes, if the values won’t ever change, it’s better not to use a uniform to pass the values but hardcode them in the shader.