I'm attempting to replicate the functionality of shadertoy in passing audio frequency and waveform into a shader using three.js.
In this specific example, it appears that IQ is converting audio data into an image which is then utilized as a texture in the shader. How can I generate this audio texture in Javascript?
Just to clarify, I don't require assistance with loading the texture uniform into the shader. My challenge lies in creating the audio texture from an audio file.
var texture = new THREE.Texture();
shader.uniforms = {
iChannel0: { type: 't', value: texture }
};
I assume I'll need to encode audio data into the texture, but I am uncertain about how to proceed with this process.