DirectionalLight Type
Directional light (e.g., sun). Infinite distance, parallel rays. Covers the entire view frustum via cascades.
Record fields
| Record Field |
Description
|
Full Usage:
CascadeCount
Field type: int
|
Number of shadow cascades (1-4).
|
Full Usage:
CascadeSplits
Field type: float32[]
|
Manual split distances for cascades (0.0 to 1.0 relative to ViewFrustum far plane). Example: [| 0.05f; 0.15f; 0.5f; 1.0f |] Adjust these to concentrate resolution near the camera.
|
Light color. Multiplied with intensity for final contribution. Use Color.White for neutral light, or tints for artistic effects.
|
|
Direction light is pointing (should be normalized). Points toward objects. Example: Vector3(-1f, -1f, -1f) points diagonally down and away.
|
|
Full Usage:
Intensity
Field type: float32
|
Light intensity (typically 1.0 - 5.0 for sunlight). Higher values create brighter light; 1.0 = base brightness.
|
|
Shadow settings (ValueNone to disable shadows).
|
Full Usage:
SourceRadius
Field type: float32
|
Physical radius of the light source (angular diameter in radians approx). Used by PCSS algorithms to calculate penumbra softness.
|
Mibo