public sealed class VfxGraphCompilerA VFX graph, compiled to a runtime effect and the shader that runs it on a device.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Blocks in a chain, not expressions in a tree. A shader graph's edges carry values; a VFX graph's carry order — see Flow. The framework's topological sort turns the chain into the list Compile wants, and its cycle refusal means an author cannot draw a loop of blocks.
An unwired block still runs. Order among blocks nothing wires is the order they were added to the graph, because that is what the framework's sort falls back to — so a graph built by dropping blocks in and never connecting them compiles to what an author would expect, and connecting them is how to say otherwise.
Fields and properties (1)
public string DefaultNameWhat the emitted shader is called, when the graph does not say.
Methods (6)
public VfxGraphCompiler(NodeTypeRegistry registry)Starts a compiler over a node library.
protected override void Begin(NodeGraphModel graph)Called before the walk, to reset whatever the subclass accumulates.
protected override void Visit(GraphNode node, NodeTypeDefinition definition, Node instance, NodeBinding binding)Called once per node, in dependency order, with its ports already filled.
protected override VfxGraphArtefact? Finish(NodeGraphModel graph)Called after the walk, when nothing went wrong, to produce the artefact.
protected override string Constant(ReadOnlySpan<float> value, PortKind kind)protected override string Convert(string expression, PortKind from, PortKind target)How a value of one kind is read as another.
Used by (3)
- VfxDocumentVixen.Editor.AssetEditors
- VfxGraphCompilerTestsVixen.Editor.VfxGraph.Tests
- VfxImporterVixen.Editor.Assets