Looks like it could be a problem with loading the shader but it’s hard to tell just from the error. This is kind of a guess but you might need to use loadShader() instead of createShader() if the shader is in another file. I would recommend trying to get an example from this book working in p5js and then add your own shader.
This is what I was looking for ! That template and docs for integrating shaders in P5 are just awesome !
However, I just noticed that am getting significantly low FPS on Firefox (16-20) compared to Chrome(60). I am making some computations on P5 side. Is P5 hindering FPS on Firefox ?
I would guess it has to do with the JavaScript engine in firefox rather than something you’re doing. You can read more about it here. I’ve found that the performance of WebGL is very dependent of the device you use, while it often works great on my laptop it hardly works on my old phone.