K
KitKatKatu
Guest
So, ideally I would love to have a uniform vec2 array, but I don't know if that's possible and I can't even get a uniform float array to work.
I'm using shader_set_uniform_f_array() for the first time and in the yoyo doc it doesn't say how you write it in the shader. I found an example online saying it needs to be written like this:
What do you do if the length of the array "myValues" changes depending on which object is being drawn? How do you write that? I tried making a new float (i tried making it an int too):
but i'm getting errors on
Any tips?
I'm using shader_set_uniform_f_array() for the first time and in the yoyo doc it doesn't say how you write it in the shader. I found an example online saying it needs to be written like this:
Code:
uniform float myValues[12];
Code:
shader_set_uniform_f( array_length, array_length_1d(global.myValues) )
Code:
uniform float array_length;
uniform float myValues[array_length];