class

CMiriGraphicsWorldWidgetRenderer

Renders an Miri widget tree into an offscreen engine texture so the scene renderer can draw it as a real in-world quad (nameplates, ping markers). It reuses Miri's own CMiriRenderer against the bridge-adopted device — it is not a second UI renderer, just a second target — and records into the engine's current command buffer through the RHI facade, one small render pass per widget. Each widget keeps its own resolution-sized target and is only re-rendered when the screen stack marks it dirty (content changed or the distance LOD bucket moved), so an idle nameplate costs nothing per frame.

Module
MiriGraphics
Header
#include "MiriGraphics/CMiriGraphicsWorldWidgetRenderer.h"
Namespace
Mowo

The offscreen pass runs under the engine's negative-height (Vulkan Y-flip) viewport, so the produced texture is vertically mirrored relative to the UI; the world-widget quad shader reads it back with a matching V so it lands right-side-up. Colours are written in the overlay's BGRA8 space.

Constructors

SignatureNameDescription
CMiriGraphicsWorldWidgetRenderer()CMiriGraphicsWorldWidgetRenderer
~CMiriGraphicsWorldWidgetRenderer()~CMiriGraphicsWorldWidgetRenderer
CMiriGraphicsWorldWidgetRenderer(const CMiriGraphicsWorldWidgetRenderer&) = dele…CMiriGraphicsWorldWidgetRenderer

Public functions

ReturnsNameDescription
CMiriGraphicsWorldWidgetRenderer&operator=
boolIsAvailableTrue once the bridge device is up and Miri's offscreen pipelines built.
boolEnsureRenderer
uint32_tRecordPending
voidSetUprightThe target's image is read as an ordinary texture (a thumbnail, a UI panel) instead of by the world-widget quad shader, which expects the pass's vertical mirroring and undoes it.
voidSetCustomTimeOverride
voidClearCustomTimeOverride
Ref<Image2D>RenderWidgetRenders widget into owner's cached target at width x height and returns the target's colour image for the scene renderer to sample.
voidReleaseDrops the cached target for an owner that is no longer visible.
voidClearDrops every cached target (device teardown / world change).

Function details

CMiriGraphicsWorldWidgetRenderer

C++
CMiriGraphicsWorldWidgetRenderer()

~CMiriGraphicsWorldWidgetRenderer

C++
~CMiriGraphicsWorldWidgetRenderer()

CMiriGraphicsWorldWidgetRenderer

C++
CMiriGraphicsWorldWidgetRenderer(const CMiriGraphicsWorldWidgetRenderer&) = delete

operator=

C++
CMiriGraphicsWorldWidgetRenderer& operator=(const CMiriGraphicsWorldWidgetRenderer&) = delete

IsAvailable

C++
bool IsAvailable() const

True once the bridge device is up and Miri's offscreen pipelines built. Everything no-ops (returning null textures) until it is — the screen stack then keeps the widget on the screen-space fallback.

EnsureRenderer

C++
bool EnsureRenderer()

RecordPending

C++
uint32_t RecordPending()

SetUpright

C++
void SetUpright(bool upright)

The target's image is read as an ordinary texture (a thumbnail, a UI panel) instead of by the world-widget quad shader, which expects the pass's vertical mirroring and undoes it. Set before the first render.

SetCustomTimeOverride

C++
void SetCustomTimeOverride(float seconds)

ClearCustomTimeOverride

C++
void ClearCustomTimeOverride()

RenderWidget

C++
Ref<Image2D> RenderWidget(uint64_t owner, const Miri::TSharedPtr<Miri::MWidget>& widget, uint32_t width, uint32_t height, bool forceRedraw, float contentScale = 1.0f)

Renders widget into owner's cached target at width x height and returns the target's colour image for the scene renderer to sample. Returns the existing image (no GPU work) when width/height match the cached target and forceRedraw is false. Returns null when unavailable. contentScale is the paint scale: the widget lays out at width/contentScale x height/contentScale logical units, so a 1920x1080 screen drawn into a 256 px tile is laid out at its design size and scaled down, not squeezed into 256x144 units where its children fall off or overlap.

Release

C++
void Release(uint64_t owner)

Drops the cached target for an owner that is no longer visible.

Clear

C++
void Clear()

Drops every cached target (device teardown / world change).

Generated from MiriGraphics/CMiriGraphicsWorldWidgetRenderer.h via mirigraphics.json · Dec 5, 2026Version 1.1.0