threejs-worldgen
    Preparing search index...

    Function moonRadiance

    • Radiance of the moon surface along d (assumes d is inside the disc; no derivatives).

      Parameters

      • u: {
            airglow: UniformNode<"color", Color>;
            airglowBand: UniformNode<"float", number>;
            airglowBandColor: UniformNode<"vec3", Vector3>;
            airglowShell: UniformNode<"vec3", Vector3>;
            atmosphereHeight: UniformNode<"float", number>;
            bodyMatrix: UniformNode<"mat3", Matrix3>;
            cameraToPlanet: UniformNode<"vec3", Vector3>;
            celestialMatrix: UniformNode<"mat3", Matrix3>;
            density: UniformNode<"float", number>;
            earthshine: UniformNode<"float", number>;
            groundColor: UniformNode<"color", Color>;
            mie: UniformNode<"float", number>;
            mieAbsorption: UniformNode<"float", number>;
            mieG: UniformNode<"float", number>;
            mieScaleHeight: UniformNode<"float", number>;
            moonAlbedoScale: UniformNode<"float", number>;
            moonAngularRadius: UniformNode<"float", number>;
            moonBrightness: UniformNode<"float", number>;
            moonDirection: UniformNode<"vec3", Vector3>;
            moonIllumination: UniformNode<"float", number>;
            moonMatrix: UniformNode<"mat3", Matrix3>;
            moonSkyIntensity: UniformNode<"float", number>;
            night: UniformNode<"float", number>;
            nightFloor: UniformNode<"float", number>;
            nightLights: {
                color: UniformNode<"vec3", Vector3>;
                density: UniformNode<"float", number>;
                intensity: UniformNode<"float", number>;
                map: TextureNode<"vec4">;
                planetRadius: UniformNode<"float", number>;
                scale: UniformNode<"float", number>;
                twilight: UniformNode<"vec3", Vector3>;
                useTexture: UniformNode<"float", number>;
            };
            ozone: UniformNode<"vec3", Vector3>;
            ozoneCenter: UniformNode<"float", number>;
            ozoneWidth: UniformNode<"float", number>;
            planetRadius: UniformNode<"float", number>;
            rayleigh: UniformNode<"vec3", Vector3>;
            rayleighScaleHeight: UniformNode<"float", number>;
            sunAngularRadius: UniformNode<"float", number>;
            sunColor: UniformNode<"color", Color>;
            sunDirection: UniformNode<"vec3", Vector3>;
            sunDiscIntensity: UniformNode<"float", number>;
            sunIntensity: UniformNode<"float", number>;
            up: UniformNode<"vec3", Vector3>;
        }
        • airglow: UniformNode<"color", Color>

          Faint night-sky glow (linear RGB radiance).

        • airglowBand: UniformNode<"float", number>

          Airglow shell brightness.

        • airglowBandColor: UniformNode<"vec3", Vector3>

          Airglow shell colour (linear).

        • airglowShell: UniformNode<"vec3", Vector3>

          Airglow shell bottom and top altitudes, metres (mesopause … Kármán line).

        • atmosphereHeight: UniformNode<"float", number>

          Atmosphere thickness, metres.

        • bodyMatrix: UniformNode<"mat3", Matrix3>

          Render → home planet body frame.

        • cameraToPlanet: UniformNode<"vec3", Vector3>

          Camera position minus planet centre, render space, metres.

        • celestialMatrix: UniformNode<"mat3", Matrix3>

          Render → star frame (fixed stars; turns with sidereal time).

        • density: UniformNode<"float", number>

          Density multiplier (0 = no atmosphere).

        • earthshine: UniformNode<"float", number>

          Earthshine radiance factor on the moon's dark side.

        • groundColor: UniformNode<"color", Color>

          Ground albedo seen through the atmosphere where no terrain is drawn (linear RGB).

        • mie: UniformNode<"float", number>

          Mie scattering per metre.

        • mieAbsorption: UniformNode<"float", number>

          Mie absorption per metre.

        • mieG: UniformNode<"float", number>

          Mie anisotropy.

        • mieScaleHeight: UniformNode<"float", number>

          Mie scale height, metres.

        • moonAlbedoScale: UniformNode<"float", number>

          Multiplier on the moon's albedo map.

        • moonAngularRadius: UniformNode<"float", number>

          Apparent moon radius, radians (0 = no moon).

        • moonBrightness: UniformNode<"float", number>

          Multiplier on the moon disc's sunlit radiance.

        • moonDirection: UniformNode<"vec3", Vector3>

          Towards the moon (render space).

        • moonIllumination: UniformNode<"float", number>

          Lit fraction of the moon.

        • moonMatrix: UniformNode<"mat3", Matrix3>

          Render → moon body frame.

        • moonSkyIntensity: UniformNode<"float", number>

          How strongly moonlight lights the sky, relative to the sun.

        • night: UniformNode<"float", number>

          0 by day … 1 at night. Bind it in your own materials (e.g. lit windows).

        • nightFloor: UniformNode<"float", number>

          Minimum light on the night side of the planet seen from altitude (fraction of sunIntensity).

        • nightLights: {
              color: UniformNode<"vec3", Vector3>;
              density: UniformNode<"float", number>;
              intensity: UniformNode<"float", number>;
              map: TextureNode<"vec4">;
              planetRadius: UniformNode<"float", number>;
              scale: UniformNode<"float", number>;
              twilight: UniformNode<"vec3", Vector3>;
              useTexture: UniformNode<"float", number>;
          }

          City lights on the night side.

          • color: UniformNode<"vec3", Vector3>

            Light colour (linear).

          • density: UniformNode<"float", number>

            Procedural coverage.

          • intensity: UniformNode<"float", number>

            Radiance of fully lit areas (0 = off).

          • map: TextureNode<"vec4">

            Lights texture (equirectangular).

          • planetRadius: UniformNode<"float", number>

            Planet radius, metres (sets the size of the sparkle).

          • scale: UniformNode<"float", number>

            Procedural feature scale.

          • twilight: UniformNode<"vec3", Vector3>

            Sun-elevation sines where lights switch on (start, full).

          • useTexture: UniformNode<"float", number>

            1 = use the texture, 0 = procedural.

        • ozone: UniformNode<"vec3", Vector3>

          Ozone absorption per metre (RGB).

        • ozoneCenter: UniformNode<"float", number>

          Ozone peak altitude, metres.

        • ozoneWidth: UniformNode<"float", number>

          Ozone layer half-width, metres.

        • planetRadius: UniformNode<"float", number>

          Planet radius, metres.

        • rayleigh: UniformNode<"vec3", Vector3>

          Rayleigh scattering per metre (RGB).

        • rayleighScaleHeight: UniformNode<"float", number>

          Rayleigh scale height, metres.

        • sunAngularRadius: UniformNode<"float", number>

          Apparent sun radius, radians.

        • sunColor: UniformNode<"color", Color>

          Sun disc colour from the star's temperature (linear RGB).

        • sunDirection: UniformNode<"vec3", Vector3>

          Towards the sun (render space).

        • sunDiscIntensity: UniformNode<"float", number>

          Sun disc radiance (HDR; drives bloom).

        • sunIntensity: UniformNode<"float", number>

          Sun radiance scale.

        • up: UniformNode<"vec3", Vector3>

          Local up at the camera (render space).

      • d: any
      • h2: any
      • D: any

      Returns any