Vixen
02b45cc4
csharp
public sealed class PbrMasterNode

A physically based surface, lit by one directional light.

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

As a graph node

Create menu
Master/PBR

Remarks

The lighting is inline and deliberately small. A master that called into Vixen.Shaders.Shading would be the right long-term arrangement and would mean a graph's output could not be compiled without the library on the include path — which is exactly what the golden tests do compile it without. So this emits a self-contained Lambert plus GGX with one directional light from uniforms: enough to be a real shader, checkable on its own, and honest about being the first half of the job.

Wiring it to the engine's real clustered lighting is a later step, and it is a change to this one method rather than to the graph, the compiler or any other node.

Fields and properties (7)

  • public Float3 BaseColour

    The surface colour.

  • public Scalar Metallic

    How metallic it is.

  • public Scalar Roughness

    How rough it is.

  • public Float3 Emission

    What it emits on its own.

  • public Scalar Alpha

    How opaque it is.

  • protected internal override string Result

    The expression the pixel stage returns.

  • public static NodeTypeDefinition Definition

    What this node type is, for the registry. Generated.

Methods (2)

  • protected internal override void Emit(RavenEmitter emitter)

    Writes whatever this node contributes.

  • public override void Bind(NodeBinding binding)

    Fills the port fields from what the compiler resolved. Generated.

Used by (1)

  • NodeTypesVixen.Editor.ShaderGraph