hex-world
    Preparing search index...

    Interface SunShadowOptions

    interface SunShadowOptions {
        mapSize?: number;
        direction?: Vector3;
        color?: ColorRepresentation;
        intensity?: number;
        maxDistance?: number;
        maxHeight?: number;
        padding?: number;
        bias?: number;
        normalBias?: number;
        shadowIntensity?: number;
    }
    Index

    Properties

    mapSize?: number

    Shadow map resolution (square). Default 2048.

    direction?: Vector3

    Direction pointing from the scene TOWARD the sun (same convention as the terrain material's lightDir). Default (100, 120, 80).

    color?: ColorRepresentation

    Sun color. Default 0xfff4d0 (warm).

    intensity?: number

    Sun intensity. Default 1.4.

    maxDistance?: number

    Furthest ground distance from the camera the shadow frustum covers, in world units. Ground beyond this renders unshadowed; smaller values spend the shadow map's texels on less area (crisper shadows). Default 90.

    maxHeight?: number

    Tallest shadow caster above the ground plane (terrain + scatter/units), world units. Default 14.

    padding?: number

    Extra world units of margin around the fitted footprint. Default 2.

    bias?: number

    Depth bias passed to the shadow map. Default -0.0002.

    normalBias?: number

    World-space normal offset for shadow lookups — the main acne guard on low-poly terrain. Default 0.6.

    shadowIntensity?: number

    Shadow darkness 0–1 (DirectionalLight.shadow.intensity). Default 1.