ShadowAtlasConfig Type
Configuration for the shadow atlas system.
This configuration controls both the atlas texture layout and shadow rendering behavior. Some fields (marked as "ForwardPbr-specific") are only used by the ForwardPbrPipeline implementation. Other pipelines may ignore these fields or use different strategies.
Record fields
| Record Field |
Description
|
Full Usage:
DirectionalLightDistance
Field type: float32 voption
|
Distance to place directional light camera behind the shadow origin. Default: auto-derived. ForwardPbr-specific: Larger values capture more of the scene but reduce shadow precision. When None, derived from camera far plane (far * 0.5). Typical range: 50-200 units.
|
Full Usage:
DirectionalLightSize
Field type: float32 voption
|
Half-size of directional light orthographic projection. Default: auto-derived. ForwardPbr-specific: Controls the coverage area of directional shadows. Larger values cast shadows over a wider area but reduce resolution. When None, derived from camera frustum at mid-distance. Typical range: 20-100 units.
|
Full Usage:
GridSnapSize
Field type: float32
|
Grid snap size for shadow origin to reduce flickering. Default: 2.0. ForwardPbr-specific: Snaps the shadow origin to a grid to prevent shadow shimmer as the camera moves. Larger values = more stable but less precise shadows. Set to 0 to disable snapping. Typical range: 1.0-5.0 units.
|
Full Usage:
MaxCasters
Field type: int
|
Maximum number of shadow casters. Must be perfect square (4, 9, 16, 25, 36).
|
|
Strategy for determining shadow map origin. Default: CameraTarget. ForwardPbr-specific: Controls where directional light shadows are centered. CameraTarget works well for third-person games where the camera follows a player. SceneCenter works for fixed scenes. Use Custom for first-person or special cases.
|
Full Usage:
Resolution
Field type: int
|
Resolution of the atlas texture (square). Default 2048.
|
Full Usage:
ShowDebugOverlay
Field type: bool
|
Whether to show debug overlay. Default false.
|
Mibo.Raylib