p5canvas icon indicating copy to clipboard operation
p5canvas copied to clipboard

Basic shader example does not work

Open timmb opened this issue 3 years ago • 2 comments

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

timmb avatar Dec 14 '21 12:12 timmb

Thanks for the example @timmb, I will have a look at it.

pixelkind avatar Dec 16 '21 10:12 pixelkind

Probably it's because I haven't implemented loadShader to use the right path 🤔

pixelkind avatar Dec 16 '21 10:12 pixelkind