Nano WebGPU API - v0.11.0
    Preparing search index...

    Interface LightGPUData

    Represents the binary GPU-ready memory alignment structure for individual lights. Conforms precisely with the WGSL standard layout struct declared within the default shader.

    interface LightGPUData {
        b: number;
        dirX?: number;
        dirY?: number;
        dirZ?: number;
        g: number;
        innerAngleCos?: number;
        intensity: number;
        outerAngleCos?: number;
        r: number;
        range?: number;
        typeFlag: number;
        x: number;
        y: number;
        z: number;
    }
    Index

    Properties

    b: number

    Blue color component in sRGB/Linear space.

    dirX?: number

    Direction X-axis component for spotlights.

    dirY?: number

    Direction Y-axis component for spotlights.

    dirZ?: number

    Direction Z-axis component for spotlights.

    g: number

    Green color component in sRGB/Linear space.

    innerAngleCos?: number

    Cosine of the inner cone threshold angle.

    intensity: number

    Physical scale factor describing light brilliance.

    outerAngleCos?: number

    Cosine of the outer cone threshold angle.

    r: number

    Red color component in sRGB/Linear space.

    range?: number

    Linear distance range limit of spotlight illumination.

    typeFlag: number

    Bitwise/ordinal flag representing light type and shadow casting parameters.

    • 0.0: Directional light, no shadows.
    • 1.0: Directional light, shadow-casting.
    • 2.0: Point light, no shadows.
    • 3.0: Point light, shadow-casting.
    • 4.0: Spotlight, no shadows.
    • 5.0: Spotlight, shadow-casting.
    x: number

    Spatial translation coordinates (point light) or normalized direction vector (directional light).

    y: number

    Spatial translation coordinates (point light) or normalized direction vector (directional light).

    z: number

    Spatial translation coordinates (point light) or normalized direction vector (directional light).