public struct PunctualLightDataOne light exactly as PunctualLight in Lighting.rvn declares it.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Eighty bytes with no padding anywhere, and that is the whole reason the field order is what it is: each float3 is followed by a float, so every member lands on its natural std140 sixteen-byte boundary. Reordered so that two vectors are adjacent, the same values cost far more and every offset moves.
Because it matches, an upload is a blit. Writing this array to a buffer is one MemoryMarshal.AsBytes and no per-field packing — which is the only reason a per-object light list is affordable at all. A test asserts the size and the offsets rather than trusting the comment, because the failure is silent: the shader reads whatever bytes are there and shades with them.
Fields and properties (12)
public Vector3 PositionWhere the light is.
public float KindWhich LightKind it is, as a float.
public Vector3 ColourIts radiance — colour already multiplied by intensity.
public float RangeWhere its contribution reaches zero.
public Vector3 DirectionWhich way it points.
public float CosInnerThe cosine of the inner cone half-angle.
public float RadiusIts sphere radius.
public float CosOuterThe cosine of the outer cone half-angle.
public float ShadowIndexWhich tile of the punctual shadow atlas shadows it, or −1 for none.
public float PaddingOne float of tail padding the shader declares and never reads.
public Vector3 TangentA shaped light's axis: along a tube, or across a rectangle's width.
public float HalfLengthHalf a tube's length, or half a rectangle's width.
Used by (8)
- BufferTransferDeviceTestsVixen.Graphics.Golden.Tests
- ClusterCullingDeviceTestsVixen.Graphics.Golden.Tests
- ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
- ForwardLightingRenderFeatureVixen.Rendering
- ForwardLightingTestsVixen.Rendering.Tests
- IrradianceBounceDeviceTestsVixen.Graphics.Golden.Tests
- IrradianceShadingDeviceTestsVixen.Graphics.Golden.Tests
- RenderLightVixen.Rendering