UseLegacyLights or light rescaling: preserving brightness across three.js versions
0 reputation · 23 Aug 2024, 19:31 UTC
Brightness Preservation Choice in three.js Upgrades
When upgrading a three.js project, the same numeric light intensities produce different visual brightness depending on whether the renderer uses the legacy non‑physical scaling or the current physically correct lighting mode. The WebGLRenderer.useLegacyLights flag can restore the old behavior where it exists, but it has been deprecated and may be absent in newer releases.
For a fixed scene that must retain identical appearance across versions, the decision is whether to keep useLegacyLights = true (when available) or to abandon the flag and rescale light/material values to match the new default.
Because the flag’s presence, default value, and deprecation status vary between builds, it is unclear which approach yields a reliable, future‑proof solution.
- In which three.js releases does useLegacyLights exist, what is its default, and does accessing it produce a warning?
- If the flag is missing, does the renderer silently fall back to physically correct lighting or throw an error?