Documentation
    Preparing search index...

    Variable HEMISPHERE_LIGHT_GLSLConst

    HEMISPHERE_LIGHT_GLSL: "uniform vec3 hemisphereSky;\nuniform vec3 hemisphereGround;\nuniform vec3 hemisphereUp;\nuniform bool useHemisphere;\n\nvec3 hemisphereAmbient(float normalLength, vec3 n) {\n if (!useHemisphere) {\n return vec3(0.0);\n }\n float w = normalLength > 0.0\n ? clamp(0.5 * dot(n, hemisphereUp) + 0.5, 0.0, 1.0)\n : 0.5;\n return mix(hemisphereGround, hemisphereSky, w);\n}\n" = ...

    The hemisphere chunk both shaded fragment stages splice in (§68; 2026-09-10) — a two-colour directional ambient, not a lamp.

    w    = 0.5 · n · up + 0.5
    hemi = mix(ground, sky, w)
    

    Sky and ground are already color × intensity (R-13). useHemisphere starts at GL's initial false, so a scene with no hemisphere issues no upload at all — HemisphereLightUniforms' skip rule, the same contract PunctualLightUniforms states for the light set. A fragment with no normal uses the 0.5 mix (constant extra ambient) rather than inventing a world-up; a metal on the standard stage still multiplies the term by the diffuse colour, so it stays black.