We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't seem to get webgl mode to work when using p5js shaders in Hydra: Uncaught Error: shader() is only supported in WEBGL mode. Here is the code:
Uncaught Error: shader() is only supported in WEBGL mode.
p5 = new P5({width: window.innerWidth, height:window.innerHeight, mode: 'WEBGL'}) shader = p5.loadShader("https://raw.githubusercontent.com/aaronsherwood/liveCoding/main/Class_Examples/shaders/basic.vert", "https://raw.githubusercontent.com/aaronsherwood/liveCoding/main/Class_Examples/shaders/ocean.frag"); p5.pixelDensity(1); p5.draw = () => { shader.setUniform("time", time * 0.3); shader.setUniform("resolution", [width, height]); shader.setUniform("mouse", [p5.mouseX, p5.mouseY]); p5.shader(shader); p5.rect(0, 0, width, height); } p5.hide(); s0.init({ src: p5.canvas }) src(s0).out()
This works fine in normal hydra, see here.
The text was updated successfully, but these errors were encountered:
PS I had a version of flok-web 0.4.12 on my computer and in that version it works.
Sorry, something went wrong.
Typing "WEBGL" as "webgl" in lowercase seemed to fix the issue on my end. The type definitions for p5 seem to all be using lowercase values.
Thanks for reporting this. That's weird, maybe the bundled version of P5 that flok uses is different from the one Hydra uses. I'll take a look.
munshkr
No branches or pull requests
Can't seem to get webgl mode to work when using p5js shaders in Hydra:
Uncaught Error: shader() is only supported in WEBGL mode.
Here is the code:This works fine in normal hydra, see here.
The text was updated successfully, but these errors were encountered: