Shader export
Converting an Expression to standalone shader source is written and tested, and nothing in the app can trigger it.
Shader export exists as a library and a test file. There is no button, no menu item, no node parameter and no command that reaches it: the Export panel's format list has no shader entry, Export's formats are Video, Image Sequence, 3D Mesh and Splat, and the conversion has no caller outside its own test.
The page below records what the converter does, so that the gap is documented rather than implied. To take a look elsewhere today, render frames with Video & image export or geometry with 3D & splat export.
Languages
The converter takes the formula an Expression compiles to and emits, per target:
GLSL and GLSL ES: desktop OpenGL 4.5 and OpenGL ES 3.0.
HLSL: Shader Model 6.0, for DirectX engines.
Metal: MSL 2.4, for Apple platforms.
ShaderToy: GLSL wrapped in a
mainImagefunction, ready to paste into shadertoy.com.Unity: HLSL wrapped in a ShaderLab template, with the vertex and fragment boilerplate filled in.
WGSL: not a shader. This target returns the bare expression text with no module and no entry point, referencing globals that nothing declares.
The five real targets are cross-compiled from an assembled WGSL module, so one formula comes out consistent across all of them.
How the context maps across
An Expression can read time, frame, canvas size and the surface coordinate. Those are rewritten to each engine's own equivalents.
In ShaderToy, time becomes iTime, the frame counter iFrame, the frame delta iTimeDelta, and the canvas size iResolution; the surface coordinate is computed as fragCoord / iResolution.xy. In Unity, time becomes _Time.y, the delta unity_DeltaTime.x, the canvas size _ScreenParams, and the frame counter is pinned to zero because Unity has none.
Tempo values have no standard equivalent in a plain shader. The ShaderToy output writes them as fixed placeholders, BPM 120 with beat, bar and phase at zero. The Unity template maps none of them, so a tempo-reading Expression leaves undeclared identifiers behind and will not compile there. For live tempo-reactive work see Tempo sync.
Scope and limits
The conversion captures one Expression's formula. Not the graph around it, and not geometry, simulation, multi-pass rendering, lights, cameras or materials.
The formula is treated as running once per pixel across a full-screen quad. Per-element values, such as an element index or the number of elements in a Collection, are flattened to a single element, so an Expression written to vary across many points loses that variation.
A formula returning something a pixel shader cannot hand back, a matrix or a multi-field record, comes out as a valid shader that returns opaque black.
An Expression that samples a texture cannot be converted at all. The assembled module declares no texture or sampler bindings, so the source references undefined names and validation rejects it.
A conversion that fails does not produce partial output. The whole result is replaced by a single
//comment naming the target and the error.
See also
The Expression language: where these formulas are authored
Built-in functions: the building blocks a formula is made of