It is possible to use array in GLSL like this:
float[4](.5, .5, .5, .5)
Is it possible to use arrays in metal shader, if yes how can I declare it? Thanks!
It is possible to use array in GLSL like this:
float[4](.5, .5, .5, .5)
Is it possible to use arrays in metal shader, if yes how can I declare it? Thanks!
It works almost like in c++:
float array[3] = float[3](0.5,0.5,0.5);
float array[3] = float[3](0.5);// also works, but you can't initialize the entire array with that number, it's going to be (0.5,0.0,0.0)
see: https://www.khronos.org/opengl/wiki/Data_Type_(GLSL)#Arrays