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:

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.

See also