public readonly struct VideoConstantsThe sixty-four bytes a video draw is, on their way to both shader stages.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A push constant rather than a uniform buffer, for the reason the UI's projection is one: it is sixteen floats that change per draw, and a descriptor set for that would be a set to allocate, bind and invalidate on every video on the screen. Sixty-four bytes is half of the hundred and twenty-eight every Vulkan implementation guarantees.
⚠ Laid out to match the shader's layout(push_constant) block field for field. Nothing checks that at compile time, on any engine — a mismatch is a picture in the wrong place or the wrong colour rather than an error — so the block is one struct here and one block there, and both are commented with the same names.
Fields and properties (5)
public const int SizeHow many bytes the block is.
public readonly Vector4 PlacementClip-space scale (xy) and offset (zw), which turn a 0–1 corner into a position.
public readonly Vector4 CropTexture-coordinate scale (xy) and offset (zw), which crop the picture.
public readonly Vector4 LumaLuma offset, luma scale, V's contribution to red, U's to blue.
public readonly Vector4 ChromaU's contribution to green, V's, the tint alpha, and the sample mode.
Methods (2)
public static VideoConstants For(in VideoDraw draw, Int2 surface)Works the block out for one draw.
public static VideoSampleMode ModeOf(VideoTexture? texture)Which of the three shapes a texture's planes are.
Used by (2)
- VideoConstantsTestsVixen.Video.Rendering.Tests
- VideoRendererVixen.Video.Rendering