I want to use array in my shader.
I know how to pass value:
shaderMat.SetFloat("_Sample0", 150);
In my shader, I have declared:
uniform float _Sample[2];
But when I try to access the values as **_Sample[0]** or **_Sample[1]** it doesnt work. It seems all indexes has value 0 in them no matter what I do.
Please, any ideas?
Thanks
↧