hydra-synth/hydra

Export as WebGL?

Closed this issue · 2 comments

I presume since this is webGL under the hood we should be able to export our art as a fragment shader (or series of frag shaders). Can this be done somehow now, and if not can we put in a feature request for it? Interested in optimizing my code.

Oh wait I see there's a glsl command that pairs into regl. Is there some guide somewhere for taking the properties of the object and using it in vanilla JS + webgl?

you can always use hydra-synth as a module
https://github.com/hydra-synth/hydra-synth/#to-include-in-a-webpage-bundled-version

exporting is not a trivial issue because you need to take into account a few things like feedback (cross reference between buffers), uniforms (time, functions, arrays) and it's not as easy as exporting a frag shader. Please reopen if this is not what you are looking for!