How to export CHOP array to GLSL array1?

Guys i am having trouble to send a array data into glsl array,
it looks like i should do uniform float tweakValue[10]; in glsl code to make them uniform and then declare them in array 1 of glsl node

and then i just drop a regular constant chop into the chop section.

but it only works in the glsl on tweakValue[0]. all the rest value like tweakValue[1] or tweakValue[2] tweakValue[3] etc only have value 0;

can anybody help check what i did wrong here? maybe i have to drag specific chop node?


Put a Shuffle CHOP after your constant CHOP and set the shuffle chop’s method to “Swap Channels and Samples”. Then use that chop or another null for the array parameter on the GLSL top.

Hey man, i did fellow your instruction , it looks like only output the first value of the array in shuffle node and did not apply dynamic value to the glsl array parameter . any idea?
thank you for the help anyway!


sorry man , i got it works , you are right!
but why the array need shuffle swap>? the default output is channels instead sample form consistant

The reason is because you can have 4 channels and declare your uniform as a vec4. The 4 channels will be put into RGBA/XYZW