public sealed class VideoRenderFeatureDraws videos inside somebody else's renderer.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A thin adapter, deliberately, and the same shape UiRenderFeature is: everything that touches a device is in VideoRenderer, which a sample or a golden image can drive directly, and this is what makes one of those reachable from a RenderSystem.
⚠ Screen-space, and that is a scope rather than a shortcut. A video quad placed in a rectangle of the target is what a cutscene, a menu background and a panel in a user interface all are, and it is what this draws. A video on a surface in the world — a television in a corridor, lit by the scene's lights — is a material on a mesh, which is MaterialRenderFeature's and, once it lands, Raven's: three planes and six coefficients are exactly what a material node would consume, and nothing here is in its way.
⚠ One render object per video, not one per frame of it. The store's objects live across frames and are indexed by a dense id every feature's parallel array is keyed on, so an object that came and went with each picture would churn the whole store twenty-five times a second. What changes per frame is the contents of the textures, which the upload has already dealt with by the time anything here runs.
Fields and properties (3)
public override string NameThe feature's name, for logging and profiling.
public VideoRenderer? RendererWhat actually draws. Set before the first frame that draws.
public Int2 SurfaceHow large the target is, in the units the draws' rectangles are measured in.
Methods (5)
public void Set(RenderObjectId id, in VideoDraw draw)Points an object at the video it draws.
public bool Remove(RenderObjectId id)Forgets a video, for an object that has gone away.
public bool TryGet(RenderObjectId id, out VideoDraw draw)What an object is currently drawing.
protected override void Draw(RenderSystem system, RenderDrawContext context, ReadOnlySpan<RenderNode> nodes)Records this feature's share of one stage's work into a command list.
protected override uint SortGroupOf(RenderSystem system, RenderObjectId id, RenderStage stage)
Used by (1)
- VideoSurfaceUploaderVixen.Video.Rendering