Whether StandardProgram.dispose has run.
Deletes the GL program (§83). Idempotent.
Only call this on a live context — see UnlitProgram.dispose.
Uploads the scene ambient term (§68), straight RGB. Accepts the
SceneLights record's own live array — copied into scratch, as every
upload here is.
Uploads §59's baseColor as straight-alpha, linear-light RGBA, scaled by
the material's opacity exactly as UnlitProgram.setColor does — see it
for the multiply and for why the default reproduces an untouched material's
upload bit for bit. Accepts the material's own live array; the values are
copied into scratch, so the material keeps ownership of its array.
Optionalopacity: numberUploads the world-space eye position the specular lobe is evaluated against — the one per-view input a diffuse-only pipeline never needed.
Three scalars rather than a matrix or a Vector3, because the renderer
reads them straight out of the camera's world matrix translation column and
has nothing to allocate on the way.
Uploads the directional light (§68): the world-space unit vector the light
travels along (SceneLights.direction — the fragment stage negates it)
and its colour premultiplied by intensity (SceneLights.directionalColor).
A frame with no directional light uploads black, which zeroes the whole
direct term — one shader, no variants, exactly as in LitProgram.
Selects whether this draw samples the bound base-colour texture (§59's
map), the packed metallic-roughness map, and/or the emissive map.
Identical in contract to LitProgram.setFeatures — mirrored on the
CPU, uploaded only on change, sampler units uploaded lazily the first
time this program draws that texture at all. Extra booleans default
false so a one-argument call stays the untextured-MR/emissive draw
it was before those maps existed (R-19: a uniform switch, not a
shader variant).
OptionaluseMetalRoughnessMap: booleanOptionaluseEmissiveMap: booleanOptionaluseNormalMap: booleanOptionaluseOcclusionMap: booleanUploads the frame's hemisphere (§68) — or nothing, for a scene that
has none. See HemisphereLightUniforms for the contract.
Offset encoding makes GL's zero-initialized uniforms the glTF defaults.
OptionalnormalScale: numberOptionalocclusionStrength: numberUploads one render item's world matrix and its derived normal matrix.
Uploads the frame's point and spot lights (§68, R-17) — or nothing, for a
scene that has none. See PunctualLightUniforms for the contract and for
why "nothing" is load-bearing.
Selects whether the draw about to be issued is shadowed (§49's
receiveShadow, §69) — see ShadowUniforms.setReceiving, whose contract
this is verbatim.
Uploads the frame's shadow matrix, biases and tap size (§69, R-18) — or
nothing, for a frame in which no light casts. Call once per viewport; see
ShadowUniforms for the contract and for why "nothing" is load-bearing.
Uploads the three surface parameters §59 puts beside the base colour:
metalness, roughness, and the straight-RGB emissive term.
One method rather than three, because they are one material's description of one surface and every draw uploads all of them: splitting would triple the call sites for no caller that wants two of the three. Values are uploaded as authored — the material documents 0…1 and does not clamp, and the shader applies the one floor it cannot survive without (see the module header).
Uploads projection * view for the viewport being drawn. Column-major, so
transpose is false — the engine's Matrix4 layout is already GL's (§7b).
Makes this the current program. Call before any upload below.
StaticcreateCompiles and links the standard program on gl.
Fails exactly as UnlitProgram.create does — see it, and
createLinkedProgram, for the contract; the messages name "standard" and
the §89 code is the same.
The metallic-roughness pipeline (§57's
StandardMaterial, §59, §68).Light and camera uniforms are per-frame state uploaded per viewport — they live in the program object, exactly like the view-projection, so one upload holds for every standard draw into that view even when other pipelines run in between.
Owns its GL objects and nothing else; the renderer re-creates it on context restore exactly as it re-creates the other five (§61).