For Loop to iterate through global arrays
Posted: Sun Nov 26, 2017 1:01 pm
Hey there,
is there a possibility to iterate through the indices of a global array somehow?
What i want to do is to give the shader an array of positions and then check if a vertex
is in range of one of these positions and if so, do something specific.
Not entirely sure how to do it with multiple positions thats why im asking for arrays.
One position is no problem but i dont know how to achieve the same behaviour for multiple positions (dynamic in count).
is there a possibility to iterate through the indices of a global array somehow?
What i want to do is to give the shader an array of positions and then check if a vertex
is in range of one of these positions and if so, do something specific.
Not entirely sure how to do it with multiple positions thats why im asking for arrays.
One position is no problem but i dont know how to achieve the same behaviour for multiple positions (dynamic in count).