InstancedRenderContext<'T, 'K> Type
Contextual object for instanced cell grid rendering. Bundles the key/material/transform functions and manages internal reusable storage and snapshot pooling to avoid per-frame allocations.
Constructors
| Constructor |
Description
|
Full Usage:
InstancedRenderContext(getKey, getMeshesMaterialAndShader, getTransform)
Parameters:
'T -> 'K
getMeshesMaterialAndShader : 'T -> (Mesh * Material3D * Shader voption)[]
getTransform : Vector3 -> 'T -> Matrix4x4
Returns: InstancedRenderContext<'T, 'K>
|
Overload constructor for per-sub-mesh shaders: each triple may carry a
|
Full Usage:
InstancedRenderContext(getKey, getMeshesAndMaterial, getTransform)
Parameters:
'T -> 'K
getMeshesAndMaterial : 'T -> (Mesh * Material3D)[]
getTransform : Vector3 -> 'T -> Matrix4x4
Returns: InstancedRenderContext<'T, 'K>
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.GetKey
Returns: 'T -> 'K
|
|
|
|
|
|
Full Usage:
this.RenderCellGridInstanced
Parameters:
RenderBuffer3D
grid : CellGrid3D<'T>
shaderForKey : 'K -> Shader voption
|
Emit instanced draw commands for every occupied cell of grid, grouping cells by shaderForKey: cells whose key maps to a shader are shaded by it (when it opts into instancing), keys mapped to ValueNone keep the default PBR instanced path. See docs/graphics3d/instancing.md.
|
|
Emit instanced draw commands for every occupied cell of grid, shaded by the default PBR instanced path.
|
Full Usage:
this.RenderCellGridVolumeInstanced
Parameters:
RenderBuffer3D
bounds : BoundingBox
grid : CellGrid3D<'T>
shaderForKey : 'K -> Shader voption
|
Emit instanced draw commands for the occupied cells of grid inside bounds, grouping cells by shaderForKey: cells whose key maps to a shader are shaded by it (when it opts into instancing), keys mapped to ValueNone keep the default PBR instanced path. See docs/graphics3d/instancing.md.
|
Full Usage:
this.RenderCellGridVolumeInstanced
Parameters:
RenderBuffer3D
bounds : BoundingBox
grid : CellGrid3D<'T>
|
Emit instanced draw commands for the occupied cells of grid inside bounds, shaded by the default PBR instanced path.
|
Full Usage:
this.RenderHexGridInstanced
Parameters:
RenderBuffer3D
grid : HexGrid3D<'T>
shaderForKey : 'K -> Shader voption
|
Emit instanced draw commands for every occupied cell of the hex grid, grouping cells by shaderForKey: cells whose key maps to a shader are shaded by it (when it opts into instancing), keys mapped to ValueNone keep the default PBR instanced path. See docs/graphics3d/instancing.md.
|
|
Emit instanced draw commands for every occupied cell of the hex grid, shaded by the default PBR instanced path.
|
Full Usage:
this.RenderHexGridVolumeInstanced
Parameters:
RenderBuffer3D
bounds : BoundingBox
grid : HexGrid3D<'T>
shaderForKey : 'K -> Shader voption
|
Emit instanced draw commands for the occupied cells of the hex grid inside bounds, grouping cells by shaderForKey: cells whose key maps to a shader are shaded by it (when it opts into instancing), keys mapped to ValueNone keep the default PBR instanced path. See docs/graphics3d/instancing.md.
|
Full Usage:
this.RenderHexGridVolumeInstanced
Parameters:
RenderBuffer3D
bounds : BoundingBox
grid : HexGrid3D<'T>
|
Emit instanced draw commands for the occupied cells of the hex grid inside bounds, shaded by the default PBR instanced path.
|
Full Usage:
this.ResetFrameBuffers
|
Returns pooled snapshot arrays to ArrayPool
and clears internal tracking state. Call once per frame before
invoking Skippable if GC pressure from instanced rendering is acceptable, but recommended for steady-state zero-alloc rendering. |
Mibo