p5canvas
p5canvas copied to clipboard
Basic shader example does not work
I'm trying to run the most basic shader example here: https://github.com/aferriss/p5jsShaderExamples/tree/gh-pages/1_basics/1-1_red
If I launch a little server (python -m http.server 8123
) then the example works fine in Firefox.
But p5canvas gives me a compile error:
🚫: {}
🚫: {}
🚫: Yikes! An error occurred compiling the vertex shader:ERROR: 0:1: 'undefined' : syntax error
🚫: Yikes! An error occurred compiling the vertex shader:ERROR: 0:1: 'undefined' : syntax error
🦷: Uncaught TypeError: Failed to execute 'useProgram' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'. in Line -3 / Column 791408
Thanks for the example @timmb, I will have a look at it.
Probably it's because I haven't implemented loadShader
to use the right path 🤔