Vixen
dd8b0a81
csharp
public readonly record struct TextureGraphExternal

One external image a compiled graph needs, and what fills it.

Read the guide page for this →

Remarks

⚠ Carried by the compiler rather than by the plan, for TextureGraphOutput's reason and not a new one. A plan's external image says "the caller supplies this one" and deliberately says nothing about what — that is what lets the same plan be re-evaluated over a different bitmap without recompiling. So the join between "image 3 is external" and "it is the gradient this node baked" lives here, and a bake reads it off the compiler to build the dictionary TexturePlanEvaluator.Evaluate already takes.

Two shapes because there are two kinds of caller-supplied picture, and only one of them can be produced by a pure compilation. A ramp and a curve table are baked on the CPU from the control an artist dragged — TextureRamp — so the compiler carries the bytes and a host needs no knowledge at all. An imported image is an asset: resolving it means an AssetDatabase, which a compiler that runs on every edit must not touch, so what crosses is the reference and the host does the reading.

Fields and properties (6)

  • public int Image

    Its index in Images. The entry is marked external.

  • public NodeId Node

    The node that asked for it, so an author can be sent to it.

  • public string Asset

    What the graph references, when the picture is somebody else's — an imported bitmap. Empty when the node baked Texels itself.

  • public int Width

    The picture's width in texels, or 0 when only the host knows it.

  • public int Height

    Its height.

  • public ImmutableArray<byte> Texels

    The bytes, tightly packed, top row first, in the image's own Format — exactly what TextureUploads.Add takes. Empty when names the picture instead.

Methods (1)

  • public TextureGraphExternal(int Image, NodeId Node, string Asset, int Width, int Height, ImmutableArray<byte> Texels)

    One external image a compiled graph needs, and what fills it.

Used by (21)

  • LayerStackBakeDeviceTestsVixen.Editor.Texturing.Tests
  • LayerStackCompilationVixen.Editor.Texturing
  • LayerStackCompileTestsVixen.Editor.Texturing.Tests
  • LayerStackEditingTestsVixen.Editor.Texturing.Tests
  • MaskStackTestsVixen.Editor.Texturing.Tests
  • MaterialBakeRouteVixen.Editor.Texturing
  • MeshMapGeneratorBindingTestsVixen.Editor.App.Tests
  • PaintWiringTestsVixen.Editor.Texturing.Tests
  • TextureCompoundBakeDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureCompoundLibraryTestsVixen.Editor.TextureGraph.Tests
  • TextureExternalGraphDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureExternalImagesVixen.Editor.Texturing
  • TextureGraphCompilationVixen.Editor.Texturing
  • TextureGraphCompilerVixen.Editor.TextureGraph
  • TextureGraphCompilerTestsVixen.Editor.TextureGraph.Tests
  • TextureGraphExternalsVixen.Editor.TextureGraph
  • TextureGraphPreviewsVixen.Editor.TextureGraph
  • TextureMeshMapNodeTestsVixen.Editor.TextureGraph.Tests
  • TextureNodeResolutionTestsVixen.Editor.TextureGraph.Tests
  • TextureOutputLevelTestsVixen.Editor.TextureGraph.Tests
  • TextureProjectImagesVixen.Editor.TextureGraph