SunLight

fun FilamentSceneScope.SunLight(direction: Direction = Direction(0.3f, -1f, -0.5f), color: LinearColor = LinearColor(1f, 1f, 1f), intensity: LightIntensity = LightIntensity.LuminousPower(100_000f), sun: SunParams = SunParams(), shadow: ShadowConfig? = null, castLight: Boolean = true, lightChannels: Set<Int> = setOf(0), followGroupRotation: Boolean = true)

A directional light that also draws a sun disk and halo in the sky (LightManager.Type.SUN). Same shading as DirectionalLight plus the visible disk configured by sun.

Parameters

direction

Direction the sunlight travels in world space (need not be a unit vector).

color

Linear-sRGB colour of the light.

intensity

Brightness and its unit as one value (LightIntensity).

sun

Sun-disk appearance — angular radius and halo (SunParams).

shadow

Shadow-map config (ShadowConfig), or null for no shadows.

castLight

Whether the light emits illumination (false = shadow-only).

lightChannels

Channels (0–7) this light affects; channel 0 is the default.

followGroupRotation

When inside a Group, direction turns with the group, matching how meshes rotate with it. On by default.