public sealed class ShaderGraphCompilerA shader graph, as Raven source.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Source, not IR. Doc 07 settled this: the generated shader is inspectable through "show generated code", it is type-checked by the same compiler a hand-written shader is, and its diagnostics come back with spans that map to the nodes that emitted them. A graph that lowered straight to IR would need its own type checker and would produce shaders nobody could read.
The vertex stage is fixed and the pixel stage is the graph. A shader graph is about what a surface looks like; the transform and the interpolators are the same in every one. The stage is emitted with exactly the varyings the graph asked for, so a graph that never reads a normal does not interpolate one — which is a real cost on a dense mesh and a varying slot on every mesh.
Exactly one master. A graph with none produces nothing to write; a graph with two would produce two shaders under one name. Both are reported against the graph rather than guessed at.
Fields and properties (1)
public string DefaultNameWhat the emitted shader declaration is called, when the graph does not say.
Methods (6)
public ShaderGraphCompiler(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 ShaderGraphSource? 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 (2)
- ShaderGraphCompilerTestsVixen.Editor.ShaderGraph.Tests
- ShaderGraphDocumentVixen.Editor.AssetEditors