Right now I am doing a lot of CPU intensive calculation to find certain set of vertices in my very complex data structure. Once I "found" these I go on rendering them with WebGL... I would like to use the GPU as a means for "parallelization" here.
I was wondering wether there is good way to process this data directly on the shader and use its result to render stuff. I would need it input a large array of arrays to the shader (uniforms!?) and probably keep the result of the calculations constant for every vertex that is processed by the shader.
Maybe it would be a good idea to represent all my data as a texture to input it into the shader. Can one do "look ups" on textures?
I hope that you understand my question and look forward to your thoughts on this!