Header menu logo Mibo

SceneContext Type

The scene state passed to a Draw3D.drawImmediate callback: the raw graphics device plus everything the pipeline gathered for the current frame (active camera, lights, the shadow pass output, elapsed time). Use it for fully-custom draws that need both device control and the scene data — water/refraction, screen-space effects, multi-pass.

Read-only snapshot of the frame's gather; mutate device state at your own risk (the pipeline restores viewport + camera scope around the callback). SceneContext.Shadows is ValueNone when no shadow-casting light exists.

Record fields

Record Field Description

Camera

Full Usage: Camera

Field type: Camera3D

The active camera config.

Field type: Camera3D

Device

Full Usage: Device

Field type: GraphicsDevice

The graphics device — bind render targets, blend/raster/depth states, issue raw draws.

Field type: GraphicsDevice

Lights

Full Usage: Lights

Field type: LightBuffers

The frame's accumulated lights (ambient + directional + point + spot).

Field type: LightBuffers

Projection

Full Usage: Projection

Field type: Matrix

The active camera's projection matrix.

Field type: Matrix

Shadows

Full Usage: Shadows

Field type: ShadowResult voption

The frame's shadow pass output — ValueNone when no shadow-casting light / missing DepthShadow.fx.

Field type: ShadowResult voption

Time

Full Usage: Time

Field type: float32

Total elapsed game time, in seconds — the animation clock.

Field type: float32

View

Full Usage: View

Field type: Matrix

The active camera's view matrix.

Field type: Matrix

Type something to start searching.