HI,
I'm pretty new to LWJGL/OpenGL/OpenAL/... but I'm currently trying to create a small programm which can display shaders from
www.shadertoy.com.
I got all of the basics working, the shaders get loaded and compiled and can be used. I also got adding basic textures working.
But the main reason I wanted to create this programm is to have sound visualisations calculated by shaders. The shaders on shadertoy can do this because they get a texture supplied which has at y=0 the "spectrum as grayscale values" (don't really know the correct term for that) and at y=1 the "waveform". Just write a simple shader to see the texture if you don't know what I mean.
Don't forget to set channel0 to a music clip:
void main(void)
{
vec2 uv = gl_FragCoord.xy / iResolution.xy;
gl_FragColor = texture2D(iChannel0, uv);
}
Is there a way to generate this kind of texture based on a current music clip that is played?