Can I use shaders with electron and p5js?

I am able to run this template, which create an electron app with p5js code.

But as soon as I add shader loading the app displays a black window. Everything works fine when running the same code through Brackets as a normal javascript website.

So maybe shaders and WEBGL do not work in electron?

theShader = loadShader("shader.vert", "shader.frag");

I think it really depends on your platform/browser. Phones are getting better and better, but I don’t think WebGL has reliable coverage yet.

Thanks for your reply.

I am on macOS trying to make an app for macOS.

Are you saying electron can’t do WebGL? Do I really need webGL to use shaders with p5js in electron?

Oh my bad, totally forgot what electron was for a second.

Unfortunately, this was the best my google-fu came up with. Sorry I couldn’t be more helpful :sweat_smile: