Guides
Saving images
The save plugin adds a save() method that exports the current frame as PNG. On mobile, a share dialog is shown by default.
import ShaderPad from 'shaderpad'
import save, { WithSave } from 'shaderpad/plugins/save'
const shader = new ShaderPad(fragmentShaderSrc, {
canvas,
plugins: [save()],
}) as WithSave<ShaderPad>
await shader.save('My Shader', 'Made with ShaderPad')