Put the scene's declared atmosphere on a three.js scene, or clear it when
nothing is declared.
FogExp2 is the exact law IAutoMovieFog documents and
sceneFogTransmittance reproduces on the CPU: the shader's 1 - exp(-(density * depth)^2) mix toward color. Nothing is converted on the
way in. density is handed over verbatim, and the color is written with
setRGB on the working (linear) color space, the same call
applyLightState makes for a light, because IAutoMovieColor is linear
by contract and a second convention here would make the fog and the key light
disagree about what 0.5 means.
Exported, and separate from buildScene, for the reason buildLight
is: a host that assembles its own scene graph (a production's film page,
which is what the offline renderer captures) must apply the FILM's atmosphere
through this one call rather than decorating its page with fog of its own. A
page that fogs itself proves nothing about the production.
Absent or null clears scene.fog, which is three.js's own "no fog":
fog-capable materials stop receiving the fog term. That omission says nothing
about other render state or byte-for-byte frame equality.
Put the scene's declared atmosphere on a
three.jsscene, or clear it when nothing is declared.FogExp2is the exact law IAutoMovieFog documents and sceneFogTransmittance reproduces on the CPU: the shader's1 - exp(-(density * depth)^2)mix towardcolor. Nothing is converted on the way in.densityis handed over verbatim, and the color is written withsetRGBon the working (linear) color space, the same call applyLightState makes for a light, becauseIAutoMovieColoris linear by contract and a second convention here would make the fog and the key light disagree about what0.5means.Exported, and separate from buildScene, for the reason
buildLightis: a host that assembles its own scene graph (a production's film page, which is what the offline renderer captures) must apply the FILM's atmosphere through this one call rather than decorating its page with fog of its own. A page that fogs itself proves nothing about the production.Absent or
nullclearsscene.fog, which isthree.js's own "no fog": fog-capable materials stop receiving the fog term. That omission says nothing about other render state or byte-for-byte frame equality.