Hi All,
I'm working on a music visualizer based on pishadertoy (https://github.com/dff180/pishadertoy).
I already managed to integrate a pulseaudio listener to get the audio input, and I also managed to pass a limited number of music related variables (eg. energy, frequency etc) to the shader as uniform variables and I can use them for controlling colors, ampulited etc, and thats fine..
However, I also want to display the audio sample so I tried to pass the array of audio samples as a uniform array to GLSL. The problem is when I try to use this array to decide what to do with a specific pixel I got this error:
"Support for indexing array/vector/matrix with a non-constant is not mandated in the fragment shader."
It there any common solution how to override this limitation? What should I do in order to use an non-constant array to control the operation of fragment shader. I was already thinking on to depict the audio signal in a texture and to display this texture in the fragment shader but I'm not sure whether this is best solution.
Thanks for your advice in advance!