Effect contracts
Every effect declares its parameters, inputs, textures, passes, tags, and shader programs so tools can inspect what they are about to run.
Noisemaker Engine
Compose with Noisemaker Engine's Polymorphic DSL, run on WebGL2 or WebGPU across web, desktop, and mobile. Open source and MIT licensed.
Architecture
Every effect declares its parameters, inputs, textures, passes, tags, and shader programs so tools can inspect what they are about to run.
A layer stack, a camera filter, an audio visualizer, or a 3D volume can be represented as a compact program string.
Oscillators, MIDI, audio bands, media textures, image sources, text, meshes, and volume buffers all enter through named contracts.
The runtime can compile, unparse, list steps, replace compatible effects, and apply parameter updates without treating source as opaque text.
Programs can group contiguous effects, write intermediate surfaces, and route multiple chains through explicit buffers.
Polymorphic is terse enough for live coding and structured enough for a coding agent to inspect, modify, and validate.
Capability
The catalog includes sources, transforms, simulations, compositing, 3D volumes, feedback, media, text, color, geometry, and render utilities.
Color, blur, distortion, grading, lens, glitch, text, pixel, palette, edges, temporal effects, and more.
Noise, fractals, cellular systems, gradients, media, scopes, polygon sources, and procedural starters.
Compositing and blend modes for images, video, generated textures, and intermediate surfaces.
SMRTicles simulate millions of GPU agents with composable behaviors like flocking, physarum, flow, and Lenia.
Volumetric generators and processors give shader programs structured 3D texture sources and transforms.
Mesh, point, cubemap, feedback, loop, and presentation helpers connect shader programs to browser output.
Get started
Start with the shader demo to make something now, or the integration guide to build on the engine. The same resources work for Claude, Codex, Gemini, and other coding agents.
Developers can start with the shader demo, integration guide, and shader specs. Coding agents can read llms.txt for the public index and llms-full.txt for the full system overview.
shade-mcp can search effects, inspect definitions, compile Polymorphic programs, render frames, test uniforms, and compare WebGL2 against WebGPU.
For low-level shader code for Noisedeck or another Noisemaker-based product, the portable spec defines self-contained effects with definition JSON, help docs, GLSL, WGSL, and a viewer.
The Seance SDK adds conflict-free multi-user network editing for Noisemaker Engine.
The Sync SDK sends the rendered canvas to other apps as a Syphon, Spout, NDI, or camera feed. It also lets Noisemaker Engine take up to 32 audio channels per device, working around browser limitations.
Apps
Code samples
Code samples for every listed export kit: browser integrations, native apps, and CPU renderers.
JavaScript · Browser / WebGL2
Render an animated shader directly into a canvas. No build step is needed.
Save this as a JavaScript module and load it from an HTML page with <script type="module" src="main.js"></script>. Serve the page over HTTP.
const CDN = 'https://shaders.noisedeck.app/1';
const { CanvasRenderer } = await import(
`${CDN}/noisemaker-shaders-core.esm.min.js`
);
const canvas = document.createElement('canvas');
document.body.append(canvas);
const renderer = new CanvasRenderer({
canvas, width: 512, height: 512,
basePath: CDN, useBundles: true,
preferWebGPU: false,
bundlePath: `${CDN}/effects`
});
await renderer.loadManifest();
await renderer.loadEffect('synth/noise');
await renderer.compile(`
search synth
noise(seed: 1).write(o0)
render(o0)
`);
renderer.start();
JavaScript · Browser / WebGPU
Request WebGPU for the same canvas renderer. The engine falls back to WebGL2 if WebGPU is unavailable.
Save this as a JavaScript module and load it from an HTML page with <script type="module" src="main.js"></script>. Serve the page over HTTPS or localhost.
const CDN = 'https://shaders.noisedeck.app/1';
const { CanvasRenderer } = await import(
`${CDN}/noisemaker-shaders-core.esm.min.js`
);
const canvas = document.createElement('canvas');
document.body.append(canvas);
const renderer = new CanvasRenderer({
canvas, width: 512, height: 512,
basePath: CDN, useBundles: true,
preferWebGPU: true,
bundlePath: `${CDN}/effects`
});
await renderer.loadManifest();
await renderer.loadEffect('synth/noise');
await renderer.compile(`
search synth
noise(seed: 1).write(o0)
render(o0)
`);
renderer.start();
HTML · WebGL2
Use Noisemaker in a Three.js project, with a standalone canvas, a material texture, or a post-processing pass.
In the adapter checkout, run npm install and npm run vendor. Save this HTML at the repository root and serve that directory over HTTP.
<script type="importmap">
{ "imports": {
"three": "/node_modules/three/build/three.module.js"
} }
</script>
<canvas></canvas>
<script type="module">
import { NoisemakerCanvas } from '/src/index.js';
const nm = new NoisemakerCanvas(
document.querySelector('canvas'),
{ width: 512, height: 512 }
);
await nm.compile(`
search synth
noise(seed: 1).write(o0)
render(o0)
`);
function frame(t) {
nm.renderFrame((t / 4000) % 1);
requestAnimationFrame(frame);
}
requestAnimationFrame(frame);
</script>
JavaScript · Babylon.js · WebGL2
Render a Noisemaker program into a live texture on a Babylon.js mesh.
In a checkout of noisemaker-for-babylonjs, run npm install and bash vendor/fetch.sh. Export the program to a graph:
node tools/export-fat-graph.mjs "search synth
noise(seed: 1, scaleX: 30, scaleY: 30, colorMode: 1, speed: 25).write(o0)
render(o0)" demo.fatgraph.jsonSave the sample as sample.js in the repository root. Run npx esbuild sample.js --bundle --format=esm --outfile=sample.bundle.js. Load that local bundle from an HTML page with <script type="module" src="./sample.bundle.js"></script> and serve the root over HTTP.
import {
Engine, Scene, ArcRotateCamera, Vector3,
MeshBuilder, StandardMaterial, Texture
} from '@babylonjs/core'
import '@babylonjs/core/Shaders/postprocess.vertex.js'
import { Pipeline } from './vendor/noisemaker/noisemaker-shaders-core.esm.js'
import { NoisemakerRenderer } from './src/runtime/renderer.js'
import graph from './demo.fatgraph.json'
const canvas = document.createElement('canvas')
canvas.width = 640
canvas.height = 480
document.body.appendChild(canvas)
const engine = new Engine(canvas, true)
const scene = new Scene(engine)
const camera = new ArcRotateCamera(
'camera', Math.PI / 4, Math.PI / 3, 5, Vector3.Zero(), scene
)
camera.attachControl(canvas, true)
const nm = new NoisemakerRenderer(engine, { Pipeline, size: 512 })
await nm.loadGraph(graph)
const texture = new Texture(null, scene)
texture._texture = nm.outputInternalTexture
const material = new StandardMaterial('noisemaker', scene)
material.diffuseTexture = texture
material.emissiveTexture = texture
material.disableLighting = true
const box = MeshBuilder.CreateBox('box', { size: 2 }, scene)
box.material = material
engine.runRenderLoop(() => {
nm.renderFrame((performance.now() % 10000) / 10000)
box.rotation.y += 0.004
scene.render()
})
Polymorphic DSL · Cables Standalone · CGL / WebGL2
Generate a texture inside a Cables patch with the Noisemaker Program op.
Keep the source repository intact and open examples/noisemaker-program.cables in Cables Standalone 0.11.0 or 0.11.3. The example’s DSL input on Ops.Extension.Noisemaker.Program already holds this program. The example connects Ops.Gl.MainLoop_v2 to Render, Ops.Anim.Timer_v2 to Time, and Texture to Ops.Ui.VizTexture. The op directory is Ops.Extension.Noisemaker.
search synth
noise(seed: 1, scaleX: 50, scaleY: 50, ridges: true)
.write(o0)
render(o0)
Python · Blender 5.1 · Python 3.13 · GPU
Compile a DSL program and publish its rendered pixels as a Blender Image.
Download the source repository. From its root, package the add-on with cd blender && zip -r noisemaker_blender.zip noisemaker_blender -x '*/__pycache__/*' '*.pyc'. In Blender 5.1, use Preferences → Add-ons → Install from Disk and enable Noisemaker for Blender. Run this Python in the Text Editor of an open Blender window, then use the Image Editor to choose the Image whose name the script prints. GPU evaluation requires a GUI graphics context; the documented platform is Apple Silicon / Metal.
import bpy
from noisemaker_blender import api as nm
program = nm.compile("""
search synth, filter
noise(seed: 7, scaleX: 40, scaleY: 40).bloom().write(o0)
render(o0)
""")
scene = bpy.context.scene
request = nm.FrameRequest(
frame=scene.frame_current,
subframe=scene.frame_subframe,
fps=scene.render.fps,
fps_base=scene.render.fps_base,
)
with nm.open_session(program, width=512, height=512) as session:
output = session.evaluate(request)
image = session.publish_image(output, name="Noisemaker")
# Choose this Image in the Image Editor or an Image Texture node.
print(image.name)
GDScript · Godot 4.7
Render a program into an image and display it on a TextureRect in your Godot scene.
Install and enable the Noisemaker addon. Use Godot 4.7 with the Forward+ renderer, add a TextureRect child, and attach this script to its parent node. See the setup guide for supported platforms.
extends Node
const Registry = preload(
"res://addons/noisemaker/compiler/lang/effect_registry.gd")
const Orchestrator = preload(
"res://addons/noisemaker/compiler/graph/orchestrator.gd")
const Backend = preload(
"res://addons/noisemaker/runtime/nm_backend.gd")
func _ready():
var rd = RenderingServer.create_local_rendering_device()
var registry = Registry.new()
registry.load_all()
var graph = Orchestrator.new(registry).build_graph(
"search synth; noise(seed: 1).write(o0); render(o0)")
var backend = Backend.new()
backend.setup(rd, "res://addons/noisemaker", Vector2i(512, 512))
var image: Image = backend.render_samples(graph, 1, 1)[0]
$TextureRect.texture = ImageTexture.create_from_image(image)
backend.close()
rd.free()
C# · Unity 6 · HLSL / Shader Model 4.5
Compile DSL in C# and update a material from a RenderTexture.
Add unity/com.noisemaker.hlsl/package.json from the source checkout through Package Manager → Add package from disk. Use Unity 6 (6000.0+) with Player → Color Space = Linear and a Shader Model 4.5 GPU. In a Built-in render-pipeline project, give a visible Quad an Unlit/Texture material. Save this as NoisemakerExample.cs and attach it to a GameObject. Assign Noise Definition to the package's Effects/synth/noise.json, assign Target to the Quad's Renderer, and press Play. The documented verified editor is 6000.3.16f1 on macOS Metal; WebGL is unsupported.
using UnityEngine;
using Noisemaker.Hlsl;
public class NoisemakerExample : MonoBehaviour
{
public TextAsset noiseDefinition;
public Renderer target;
private NMRenderer nm;
private Material material;
void Start()
{
var host = new GameObject("Noisemaker");
host.transform.SetParent(transform, false);
host.SetActive(false);
nm = host.AddComponent<NMRenderer>();
nm.Dsl = "search synth\nnoise(seed: 7).write(o0)\nrender(o0)";
nm.EffectDefinitions = new[] { noiseDefinition };
nm.RenderWidth = nm.RenderHeight = 512;
nm.Animate = false;
material = target.material;
host.SetActive(true); // OnEnable builds the configured pipeline.
}
void Update()
{
if (nm == null) return;
nm.RenderFrame(Mathf.Repeat(Time.time / 10f, 1f));
material.mainTexture = nm.Output;
}
void OnDestroy()
{
if (material != null) Destroy(material);
}
}
Python · TouchDesigner 2025.32820+ · GLSL TOPs
Compile DSL inside TouchDesigner and connect the generated network to a TOP.
Use TouchDesigner 2025.32820 or later on macOS Apple Silicon, activate its license, and save your .toe project. Place a checkout named noisemaker-for-touchdesigner beside that project. Create a fresh Base COMP and a Text DAT inside it; paste this Python into the DAT and run it once with Run Script. View the out TOP inside the same COMP. The Non-Commercial license supports this resolution. A logged-in GPU desktop session is required.
import sys
from pathlib import Path
# Keep the source checkout beside your saved .toe project.
sys.path.insert(0, str(
Path(project.folder) / "noisemaker-for-touchdesigner" / "td"
))
from noisemaker.runtime.nm_renderer import NMRenderer
comp = parent()
nm = NMRenderer(comp, width=512, height=512)
comp.store("nm", nm)
nm.set_dsl("""
search synth, filter
noise(seed: 7, scaleX: 40, scaleY: 40).bloom().write(o0)
render(o0)
""")
if nm.Output is None:
raise RuntimeError("Noisemaker did not produce an output TOP")
# TOP connections must stay inside the same COMP.
out = comp.op("out") or comp.create(nullTOP, "out")
out.inputConnectors[0].connect(nm.Output)
nm.set_time(0.25)
out.cook()
Lua · LÖVE 11.5 · LuaJIT 2.1 · GLSL 3
Compile DSL in Lua and draw the GPU Canvas in a LÖVE game.
Copy the repository's noisemaker/ folder into your game directory, save this as main.lua, and run love path/to/game. Use desktop LÖVE 11.5 with LuaJIT 2.1 and GLSL 3 support. Rendering needs a graphics context; the documented qualified configuration is macOS on Apple Silicon.
local nm = require('noisemaker')
local renderer, canvas, elapsed = nil, nil, 0
function love.load()
local graph, errors = nm.compile([[
search synth, filter
noise(seed: 7, scaleX: 40, scaleY: 40).bloom().write(o0)
render(o0)
]])
assert(graph, errors and errors[1] and errors[1].message)
local w, h = love.graphics.getDimensions()
renderer, errors = nm.newRenderer(graph, {width = w, height = h})
assert(renderer, errors and errors[1] and errors[1].message)
end
function love.update(dt)
elapsed = elapsed + dt
local errors
canvas, errors = renderer:render({time = (elapsed / 10) % 1})
assert(canvas, errors and errors[1] and errors[1].message)
end
function love.draw()
if canvas then love.graphics.draw(canvas, 0, 0) end
end
function love.resize(w, h)
assert(renderer:resize(w, h))
canvas = nil
end
function love.quit()
if renderer then assert(renderer:release()) end
end
C++17 · Qt 6 / OpenGL 4.1
Compile a DSL program and render a PNG through the Qt OpenGL backend.
Requires Qt 6.9 or later with Core, Gui and OpenGL, an OpenGL 4.1 core context, CMake 3.21 or later, a C++17 compiler and Git. Keep the source data directory available at runtime; CMake passes its location to the sample. Rendering requires a Qt platform plugin with OpenGL support. Use the default platform plugin on macOS; its offscreen plugin does not support the required OpenGL context.
Save the example as main.cpp in a new directory. Clone the source there:
git clone https://github.com/noisefactorllc/noisemaker-for-qt.gitSave this as CMakeLists.txt:
cmake_minimum_required(VERSION 3.21)
project(sample LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(NM_QT_BUILD_QUICK OFF CACHE BOOL "" FORCE)
add_subdirectory(noisemaker-for-qt/qt engine)
add_executable(sample main.cpp)
target_link_libraries(sample PRIVATE noisemaker-qt::noisemaker-qt)
target_compile_definitions(sample PRIVATE NM_DATA_ROOT="${NOISEMAKER_QT_DATA_ROOT}")Build and run:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/path/to/Qt"
cmake --build build --target sample --parallel
./build/sampleReplace /path/to/Qt with your Qt installation prefix. With a multi-configuration generator, build with --config Release and run the executable from its Release directory.
#include <noisemaker/compiler/dsl_compiler.h>
#include <noisemaker/compiler/effect_registry.h>
#include <noisemaker/runtime/backend.h>
#include <QGuiApplication>
#include <QDebug>
int main(int argc, char** argv) {
QGuiApplication app(argc, argv);
try {
const QString dataRoot = QStringLiteral(NM_DATA_ROOT);
nm::EffectRegistry effects;
effects.loadAll(dataRoot);
const auto graph = nm::compileGraph(
"search synth\nnoise(seed: 7).write(o0)\nrender(o0)", effects);
nm::Backend renderer;
renderer.setup(nullptr, dataRoot, QSize(256, 256));
renderer.render(graph, 0.25);
return renderer.readSurface().save("noise.png") ? 0 : 1;
} catch (const std::exception& error) {
qCritical() << error.what();
return 1;
}
}
Swift · Metal / macOS
Render into a native Metal texture on Apple Silicon. Keep the output object alive while your app uses its texture.
Use macOS 14 or later and Swift 6. Add the checkout as a local Swift package and link its Noisemaker product using the setup guide.
import Metal
import Noisemaker
let compiler = try NoisemakerCompiler()
let graph = try compiler.compileForHost(source: """
search synth
noise(seed: 1).write(o0)
render(o0)
""")
guard let device = MTLCreateSystemDefaultDevice(),
let queue = device.makeCommandQueue(),
let command = queue.makeCommandBuffer() else {
fatalError("A Metal device is required")
}
let renderer = try NoisemakerRenderer(
device: device, graph: graph,
size: try RenderSize(width: 512, height: 512)
)
let output = try renderer.encode(
frame: FrameState(time: 0, delta: 0, frameIndex: 0),
into: command
)
command.commit()
command.waitUntilCompleted()
// Use output.texture in your app.
Rust · wgpu
Render a DSL program to a PNG through the Rust GPU host API.
Requires Rust 1.88 or later and a wgpu-compatible GPU. On macOS, install the Xcode Command Line Tools, Git, curl and tar; the first build compiles Tint and fetches its pinned sources. CMake 3.22 or later is used when available, otherwise the build fetches its documented CMake version.
Create a Cargo application, clone the port into it, and save the example as src/main.rs:
cargo new noise-example
cd noise-example
git clone https://github.com/noisefactorllc/noisemaker-for-rust-gpu.gitAdd this dependency under [dependencies] in Cargo.toml:
noisemaker-for-rust-gpu = { path = "noisemaker-for-rust-gpu/crates/noisemaker-gpu" }Run cargo run --release to write noise.png. macOS with Metal is the port’s parity-qualified platform; other wgpu backends have not been parity-qualified.
use noisemaker_gpu::demo::{DemoHost, DemoHostOptions};
use noisemaker_gpu::host::{CanvasRenderer, CanvasRendererOptions};
use noisemaker_gpu::png_io::write_png_rgba8;
use noisemaker_gpu::{GpuDevice, Orientation, RenderError};
use std::path::Path;
fn main() -> Result<(), RenderError> {
let device = GpuDevice::create(&Default::default()).map_err(RenderError::Js)?;
let renderer = CanvasRenderer::new(&device, CanvasRendererOptions {
width: 256, height: 256, ..Default::default()
});
let mut host = DemoHost::new(renderer, DemoHostOptions::default());
host.rebuild_pipeline_from_dsl(
"search synth\nnoise(seed: 7).write(o0)\nrender(o0)", true)?;
host.settle()?;
let renderer = host.renderer_mut();
renderer.sync_time(0.25);
renderer.render(0.25)?;
let pixels = renderer.read_output()?.oriented(Orientation::Presented);
write_png_rgba8(Path::new("noise.png"), pixels.width, pixels.height,
&pixels.data).map_err(RenderError::Js)?;
renderer.dispose()
}
C · Native compiler core
Use the native library from C or C++. This C API example compiles DSL and prints its normalized render graph without a GPU. GPU rendering is available through Dawn and Noisedeck’s native C++ export kit.
Building the GPU-free compiler core requires CMake 3.22 or later, C and C++20 compilers, Python 3.12 or later, Node.js 26, Git and network access for the pinned effect catalog. A compatible CMake build tool is required; the project documents Ninja or Visual Studio 2026. The C API sample itself needs no GPU or Dawn build. See the repository’s testing notes for platform evidence and rendered-parity limits.
Save the example as main.c in a new directory. Clone the source there:
git clone https://github.com/noisefactorllc/libnoisemaker.gitSave this as CMakeLists.txt:
cmake_minimum_required(VERSION 3.22)
project(sample LANGUAGES C CXX)
set(NM_BUILD_GPU OFF CACHE BOOL "" FORCE)
set(NM_BUILD_TESTS OFF CACHE BOOL "" FORCE)
add_subdirectory(libnoisemaker engine)
add_executable(sample main.c)
target_link_libraries(sample PRIVATE noisemaker::core)Build and run:
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --target sample --parallel
./build/sampleFor the Visual Studio 2026 generator use CMake 4.2 or later, omit -G Ninja, build with --config Release, and run build/Release/sample.exe.
#include <noisemaker/core.h>
#include <stdio.h>
#include <string.h>
int main(void) {
const char* source =
"search synth\nnoise(seed: 7).write(o0)\nrender(o0)";
nm_compiled* program = NULL;
nm_diagnostics* diagnostics = NULL;
nm_status status = nm_compile(source, strlen(source),
&program, &diagnostics);
if (status == NM_OK)
puts(nm_compiled_graph_json_normalized(program));
else
fprintf(stderr, "%s\n", nm_last_error());
nm_compiled_destroy(program);
nm_diagnostics_destroy(diagnostics);
return status == NM_OK ? 0 : 1;
}
JavaScript · Node.js · CPU rendering
Render a Polymorphic program to a PNG using JavaScript on the CPU.
Use Node.js 22 or newer. Install with npm install github:noisefactorllc/noisemaker-for-cpu, save the sample as render.mjs, and run node render.mjs. The result is noise.png.
import {
CpuRenderer,
createDefaultRegistry,
kernelFactories,
kernels,
writePng
} from 'noisemaker-cpu/node'
const renderer = new CpuRenderer({
registry: createDefaultRegistry(),
kernels,
kernelFactories
})
const frame = renderer.render(`
search synth, filter
noise(scaleX: 18, scaleY: 12)
.posterize(levels: 8)
.write(o0)
render(o0)
`, { width: 256, height: 256, time: 0.25, seed: 11 })
await writePng('noise.png', frame)
renderer.dispose()
Python · CPU
Render an effect to a PNG without a browser or GPU. Start with a small image when using the Python CPU renderer.
Use Python 3.11 or later. Clone the Python port and run python -m pip install . from its root, then run this script.
from pathlib import Path
from noisemaker_cpu.renderer import render_effect
from noisemaker_cpu.png import encode_png
surface = render_effect(
"synth/gradient",
{},
width=64,
height=64,
seed=1,
)
Path("gradient.png").write_bytes(encode_png(surface))
Rust · CPU
Render a Polymorphic program to a PNG in a native Rust process, without a GPU or JavaScript runtime.
Use Rust 1.85 or later. In a Rust project, add the port with cargo add --git https://github.com/noisefactorllc/noisemaker-for-rust. Save this as src/main.rs and run cargo run --release.
use noisemaker_cpu::{CpuRenderer, RenderOptions, encode_png};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut renderer = CpuRenderer::new()?;
let options = RenderOptions {
width: 64,
height: 64,
seed: 1,
..Default::default()
};
let image = renderer.render(
"search synth; noise(seed: 1).write(o0); render(o0)",
&options,
)?;
std::fs::write("noise.png", encode_png(&image.surface)?)?;
Ok(())
}
C++20 · CPU
Render DSL to a PNG on the CPU with the C++20 library, also available through Noisedeck’s C++ export kit. Compatibility is measured against the port’s pinned reference.
Requires CMake 3.20 or later, a C++20 compiler, zlib and Git. The library builds from committed generated code without a GPU or shader compiler. Its CMake target supplies the required C++20 and floating-point settings.
Save the example as main.cpp in a new directory. Clone the source there:
git clone https://github.com/noisefactorllc/noisemaker-for-cpp.gitSave this as CMakeLists.txt:
cmake_minimum_required(VERSION 3.20)
project(sample LANGUAGES CXX)
set(NOISEMAKER_BUILD_DEVELOPMENT_TOOLS OFF CACHE BOOL "" FORCE)
add_subdirectory(noisemaker-for-cpp engine)
add_executable(sample main.cpp)
target_link_libraries(sample PRIVATE NoisemakerForCpp::noisemaker-cpu)Build and run:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target sample --parallel
./build/sampleWith a multi-configuration generator, build with --config Release and run the executable from its Release directory. See the repository’s coverage notes for supported effects, the published kit’s source revision and verification limits.
#include <noisemaker/renderer.hpp>
#include <noisemaker/png.hpp>
#include <fstream>
int main() {
noisemaker::Renderer renderer;
noisemaker::RenderOptions options;
options.width = 256;
options.height = 256;
const auto frame = renderer.render(
"search synth\nperlin(scale: 4, seed: 7).write(o0)\nrender(o0)",
options);
const auto png = noisemaker::encode_png(frame.surface());
std::ofstream out("perlin.png", std::ios::binary);
out.write(reinterpret_cast<const char*>(png.data()),
static_cast<std::streamsize>(png.size()));
return out ? 0 : 1;
}