Vixen
02b45cc4
csharp
public sealed class SampleTexture2DNode

A texture read at a coordinate.

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

As a graph node

Create menu
Texture/Sample 2D

Remarks

The texture and its sampler are one property, not two ports. A graph where an author wires a sampler is a graph where an author can wire the wrong one, and every real material wants the sampler that belongs to the texture. The declaration is {name} and {name}Sampler, which is the convention the hand-written library shaders already use.

The coordinate defaults to the mesh's own, because that is what an author dropping a texture node into an empty graph means — and it is the reason Stage exists rather than a UV node being compulsory.

Fields and properties (6)

  • public Float2 Uv

    Where to read. Defaults to the mesh's own coordinate.

  • public Float4 Rgba

    What was read.

  • public string PropertyType

    The Raven type the property is declared as.

  • public string DefaultProperty

    What it is called when the author has not renamed it.

  • public string PropertyName
  • 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