Shader export

Take a look you built with an Expression and hand it to another engine as ready-to-run shader code.

When you build a procedural look in DNA — a noise field, a gradient, a colour formula, a Distance Field pattern — that look is really a little piece of GPU maths. Shader export writes that maths out as standalone shader source so you can paste it into another tool and keep using it there.

What you get

DNA converts the formula in an Expression into a self-contained shader in the language you pick:

Everything except WGSL is produced by cross-compiling from the WGSL form, so the same formula comes out consistent across every target.

How the context maps across

Your Expression can read the usual live values — time, frame, the canvas size, the surface coordinate. On export these are wired to each engine's own equivalents so the shader animates the moment you drop it in:

Tempo values (BPM, beat, bar) exist in DNA but have no standard equivalent in a plain shader. In the ShaderToy output they are written out as fixed placeholders (BPM 120, beat 0) — if your look reacts to tempo, you'll need to feed those values in yourself on the other side. For live tempo-reactive work, keep it in DNA and see Tempo sync.

Textures and references

If your Expression samples an image or other texture, the export lists the texture slots it expects (named like expr_texture_0). The shader code references them by those names — you connect your own textures to those slots in the destination engine.

Scope and limits

Shader export is deliberately narrow: it captures one Expression's formula, not your whole graph.

This is single-formula export, not a scene exporter. It does not carry across geometry, simulation, multi-pass rendering, lights, cameras, materials, or anything that isn't pure maths inside one Expression. To take a full 3D scene elsewhere, use 3D & splat export; to render frames, use Video & image export.

A few more things to know:

Shader export is a young capability and is not yet a one-click button in the export panel — a richer export experience (Export panel v2) is planned. For now, treat the generated code as a strong starting point you may need to tidy by hand in the destination engine.

See also