Vixen
02b45cc4
csharp
public sealed class RavenEmitter

Where a node writes its Raven, and what it may ask the shader for.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

A node writes statements, not a shader. It has no idea what stage it is in, what the entry point is called or what the master node did; it emits lines that assign to its own output variables and it stops there. Everything structural is ShaderGraphCompiler's, which is what lets a node be twelve lines and a plugin's node be twelve lines too.

Declarations are requests, not text. A node that needs a uniform or an interpolated value says so and gets the name back; the compiler decides where the declaration goes and emits it once however many nodes asked. Two texture nodes sampling the same property declare one binding, and a graph with no normal node interpolates no normal.

Methods (4)

  • public void Emit(string statement)

    Writes one statement into the pixel stage's body.

  • public void Assign(string variable, string expression)

    Declares a value the node computes, and names it.

  • public string Uniform(string name, string type)

    Asks for a material uniform, and gets the name to read it by.

  • public string Stage(ShaderStageInput input)

    Asks for an interpolated value from the vertex stage, and gets its name.

Used by (30)

  • AbsoluteNodeVixen.Editor.ShaderGraph
  • AddNodeVixen.Editor.ShaderGraph
  • ColourPropertyNodeVixen.Editor.ShaderGraph
  • CombineNodeVixen.Editor.ShaderGraph
  • ConstantNodeVixen.Editor.ShaderGraph
  • DivideNodeVixen.Editor.ShaderGraph
  • DotNodeVixen.Editor.ShaderGraph
  • FloatPropertyNodeVixen.Editor.ShaderGraph
  • FractionNodeVixen.Editor.ShaderGraph
  • LerpNodeVixen.Editor.ShaderGraph
  • MultiplyNodeVixen.Editor.ShaderGraph
  • NormalizeNodeVixen.Editor.ShaderGraph
  • OneMinusNodeVixen.Editor.ShaderGraph
  • PbrMasterNodeVixen.Editor.ShaderGraph
  • PowerNodeVixen.Editor.ShaderGraph
  • SampleTexture2DNodeVixen.Editor.ShaderGraph
  • SaturateNodeVixen.Editor.ShaderGraph
  • ShaderNodeVixen.Editor.ShaderGraph
  • SineNodeVixen.Editor.ShaderGraph
  • SmoothstepNodeVixen.Editor.ShaderGraph
  • SplitNodeVixen.Editor.ShaderGraph
  • SpriteMasterNodeVixen.Editor.ShaderGraph
  • SubtractNodeVixen.Editor.ShaderGraph
  • TilingAndOffsetNodeVixen.Editor.ShaderGraph
  • TimeNodeVixen.Editor.ShaderGraph
  • UnlitMasterNodeVixen.Editor.ShaderGraph
  • UvNodeVixen.Editor.ShaderGraph
  • VertexColourNodeVixen.Editor.ShaderGraph
  • WorldNormalNodeVixen.Editor.ShaderGraph
  • WorldPositionNodeVixen.Editor.ShaderGraph