Header menu logo Mibo

BillboardBatch Module

A batcher for drawing camera-facing billboards (particles, sprites in 3D space).

Billboards always face the camera using camera right/up vectors.

Types

Type Description

State

Functions and values

Function or value Description

begin' state

Full Usage: begin' state

Parameters:
Modifiers: inline

Begin a batch.

state : State

create graphicsDevice

Full Usage: create graphicsDevice

Parameters:
Returns: State

Creates a new billboard batcher.

graphicsDevice : GraphicsDevice
Returns: State

dispose state

Full Usage: dispose state

Parameters:

Return pooled arrays. Call when the batch is no longer needed.

state : State

draw position size rotation color camRight camUp state

Full Usage: draw position size rotation color camRight camUp state

Parameters:

Adds a billboard to the batch.

position : Vector3
size : Vector2
rotation : float32
color : Color
camRight : Vector3
camUp : Vector3
state : State

draw2D position size rotation color uv state

Full Usage: draw2D position size rotation color uv state

Parameters:

Adds a screen-aligned 2D billboard to the batch.

position : Vector2
size : Vector2
rotation : float32
color : Color
uv : UvRect
state : State

draw2DSimple position size color state

Full Usage: draw2DSimple position size color state

Parameters:

Adds a simple screen-aligned 2D billboard to the batch.

position : Vector2
size : Vector2
color : Color
state : State

drawUv position size rotation color uv camRight camUp state

Full Usage: drawUv position size rotation color uv camRight camUp state

Parameters:

Adds a billboard to the batch with custom UVs (texture atlas).

position : Vector3
size : Vector2
rotation : float32
color : Color
uv : UvRect
camRight : Vector3
camUp : Vector3
state : State

end' effect state

Full Usage: end' effect state

Parameters:
Modifiers: inline

Ends the batch and flushes all draw commands to the GPU.

effect : Effect
state : State

flush effect state

Full Usage: flush effect state

Parameters:

Flushes the current batch to the GPU.

effect : Effect
state : State

Type something to start searching.