Vixen
feb85697
csharp
public sealed class UiComposeRenderer

Composes a UiRenderFeature's interfaces over the frame's scene.

Read the guide page for this →

Remarks

What a UiComposeAsset builds into. One pass with no attachments, reading Source as a shader resource: the graph places it after the pass that last wrote the scene, transitions the target for sampling, and — because the interface pass declares the same target as a loaded colour attachment — transitions it back afterwards. The body is UiRenderFeature.Compose with the target as Image.

⚠ Marked as a side effect, because the graph culls a pass whose writes nothing reads, and this one writes only surfaces the graph has never heard of. Culled, the interface pass would draw every group from a surface nothing had composed this frame.

⚠ WorldRenderer.Draw skips its own compose for a frame that has one of these, enabled, on an enabled path — see PathTo. Composing twice would cost a pass per group, and whichever ran second would decide the picture.

⚠ One per frame, and nothing refuses a second — UiRenderFeature.Recomposed counts it (#1461). Two nodes composing the same feature both run, each rendering every group's surface again, and the later one decides the picture. The same waste happens where the host cannot see the node: PathTo walks Nested, so a node a parent builds through BuildChild without exposing it there is invisible to it, and so is any tree that is not Host.Compositor's — the editor's panes, which EditorWorldRenderer builds with Builder.Build. In each case the prologue composes too; the picture is still the node's, because it runs later.

Fields and properties (3)

  • public required UiRenderFeature Feature

    The feature whose mounted interfaces this composes.

  • public required string Source

    The target holding the scene, which becomes every top-level group's backdrop.

  • public int ComposeCount

    How many frames this node has composed.

Methods (3)

Used by (5)

  • InterfaceComposedAfterTheSceneTestsVixen.Engine.Renderer.Tests
  • UiComposeFactoryVixen.Ui.Renderer
  • WorldRendererVixen.Engine.Renderer
  • EditorWorldRendererTestsVixen.Editor.App.Tests
  • HostedInterfaceComposeTestsVixen.App.Tests