Function: findDominantLightWorldPos()
ts
function findDominantLightWorldPos(root, out): boolean;Writes the world-space position of the brightest PointLight or DirectionalLight found anywhere under root into out.
For directional lights, a virtual point is projected along -direction at a large distance so that normalize(out - fragWorldPos) yields a near-parallel light direction — matching the expectation of shaders that model the light as a point source.
Parameters
| Parameter | Type |
|---|---|
root | Object3D |
out | Vector3 |
Returns
boolean
true when a light was found, false when the scene has none (caller should leave out at its last known value / default).