Vixen
02b45cc4
csharp
public sealed class VideoRenderFeature

Draws 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 Name

    The feature's name, for logging and profiling.

  • public VideoRenderer? Renderer

    What actually draws. Set before the first frame that draws.

  • public Int2 Surface

    How large the target is, in the units the draws' rectangles are measured in.

Methods (5)

Used by (1)

  • VideoSurfaceUploaderVixen.Video.Rendering