Logo Mibo

ShadowInstancedDraw Type

An instanced caster draw collected for the shadow pass.

Instanced geometry (e.g. a game world's block grid rendered via DrawInstanced) MUST cast shadows. Unlike ShadowMeshDraw this carries many per-instance world transforms; the pass renders it via the depth effect's DepthInstanced technique with a two-stream vertex bind (mesh + per-instance VertexInstanceWorld), one DrawInstancedPrimitives per light. No per-instance frustum cull — the sample already chunk-culls the source commands, so the emitted count is small; the cost is bounded by the surviving instance counts.

Record fields

Record Field Description

CastsShadow

Full Usage: CastsShadow

Field type: bool

Whether this draw was emitted while shadows were enabled (see ShadowMeshDraw).

Field type: bool

Colors

Full Usage: Colors

Field type: Color[] voption

The command's per-instance tint colors — read by the instance filter (null when the command drew uncolored; nothing to filter then).

Field type: Color[] voption

Filter

Full Usage: Filter

Field type: InstanceOpacityFilter

Which instances cast: the transparent tint instances defer to the sorted transparent pass in the forward pipeline, so depth renders the opaque half only.

Field type: InstanceOpacityFilter

InstanceCount

Full Usage: InstanceCount

Field type: int
Field type: int

Mesh

Full Usage: Mesh

Field type: PrimitiveMesh
Field type: PrimitiveMesh

StartIndex

Full Usage: StartIndex

Field type: int

First index of the mesh's slice within its shared buffer (startIndex).

Field type: int

Transforms

Full Usage: Transforms

Field type: Matrix[]
Field type: Matrix[]

VertexOffset

Full Usage: VertexOffset

Field type: int

First vertex of the mesh's slice within its shared buffer (baseVertex).

Field type: int

Type something to start searching.