pixelkind / p5canvas

An interactive preview for writing p5js code in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=garrit.p5canvas
Other
39 stars 4 forks source link

Basic shader example does not work #54

Open timmb opened 2 years ago

timmb commented 2 years ago

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
pixelkind commented 2 years ago

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

pixelkind commented 2 years ago

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