public sealed class UiRendererDraws a frame of interface geometry.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Everything above this is a pure function of a draw list and is tested without a device. This is where that stops: buffers, pipelines, an atlas texture and a scissor rectangle. It is kept separate from UiRenderFeature so that the part that actually touches a device can be driven by a golden image without a RenderSystem — which is the only way to find out whether the shaders agree with the geometry.
⚠ Three pipelines, one vertex layout. They differ only in the fragment stage, so a frame binds a different pipeline per batch kind and never a different buffer. That is what makes a frame one upload however many kinds of thing it draws.
⚠ Host-visible buffers, rewritten every frame, and no staging copy. The usual advice is the opposite — upload through a staging buffer into device-local memory — and it is the wrong advice here. That advice is about data the GPU reads many times; interface geometry is read once, by one draw, and then thrown away. A staging copy would add a transfer and a barrier to save nothing.
Fields and properties (15)
public const float ReferenceWhiteBT.2408's reference white: what an SDR interface is worth in a scene-referred pass.
public float WhiteLevelWhat white is worth in the pass this renderer draws into.
public int DrawsHow many draws the last Record submitted.
public int CompositedHow many groups the last Compose rendered a surface for.
public int BlurredHow many of those groups the last Compose also ran a blur over.
public int ShadowedHow many of those groups the last Compose also cast a drop shadow from.
public int BackdroppedHow many of those groups the last Compose also captured a backdrop for.
public int FilteredHow many composite draws the last Record put a colour matrix through.
public int UnblendedHow many composite draws went out source-over despite carrying a blend mode.
public int SquareBackdropsHow many rounded backdrops went out square for want of a colour stage.
public int MaskedHow many composite draws the last Record put a mask through.
public int ImageSetsHow many descriptor sets registering images has ever allocated.
public int AtlasUploadsHow many times the atlas has been copied to the GPU.
public int RegionsHow many frames' worth of geometry the buffers hold at once.
public int RegionWhich of them the last Upload wrote.
Methods (8)
public UiRenderer(IGraphicsDevice device, UiShaders shaders, RenderOutput output)Builds the pipelines a UI pass needs.
public static float WhiteLevelFor(PixelFormat format)What white is worth in a pass of this format, in that pass's own units.
public void Upload(ICommandList commands, in UiGeometry geometry, GlyphAtlas atlas)Puts this frame's geometry where the GPU can read it. Called outside a render pass.
public void Record(ICommandList commands, in UiGeometry geometry, Int2 surface, float scale = 1)Records the frame. Called inside a render pass.
public void Compose(ICommandList commands, in UiGeometry geometry, Int2 surface, float scale = 1, UiBackdropSource beneath = default(UiBackdropSource))Renders this frame's composited groups into surfaces of their own. Called outside a render pass, after Upload and before Record.
public void RegisterImage(ulong image, TextureViewHandle view)Names a texture, so a draw list can ask for it.
public bool UnregisterImage(ulong image)Forgets a texture.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (22)
- HudLuminanceDeviceTestsVixen.Graphics.Golden.Tests
- InterfaceInAWorldTestsVixen.Engine.Renderer.Tests
- UiApplicationVixen.Ui.Desktop
- UiBoxAgreementTestsVixen.Graphics.Golden.Tests
- UiCompositingTestsVixen.Graphics.Golden.Tests
- UiFrameLifetimeTestsVixen.Graphics.Golden.Tests
- UiImageTestsVixen.Graphics.Golden.Tests
- UiImageViewTestsVixen.Graphics.Golden.Tests
- UiRavenAgreementTestsVixen.Graphics.Golden.Tests
- UiRenderFeatureVixen.Ui.Renderer
- UiWindowSurfaceVixen.Ui.Desktop
- VideoInUiTestsVixen.Video.Rendering.Tests
- ComposedPaneCaptureTestsVixen.Editor.App.Tests
- ComposedPaneTestsVixen.Editor.App.Tests
- EditorHostVixen.Editor.Host
- EditorUiCompositingDeviceTestsVixen.Editor.App.Tests
- FramePresenterVixen.Editor.App
- FramePresenterTestsVixen.Editor.App.Tests
- ScenePresenterVixen.Editor.App
- ThumbnailSurfaceVixen.Editor.App
- ThumbnailSurfaceDeviceTestsVixen.Editor.App.Tests
- UiPreviewImagesVixen.Editor.App