sampledEnvironment property

EnvironmentMap? sampledEnvironment
getter/setter pair

The environment a useEnvironment shader samples, overriding the scene's.

Null (the default) samples the scene's active environment. Set a fixed map when this same sky drives the scene's lighting through a SkyEnvironment: the scene's environment then holds the sky's own bake, and without an override the bake pass substitutes an empty environment (a sky cannot sample the environment it is producing). A fixed override is safe there, so both the background draw and the bake sample it.

Implementation

EnvironmentMap? sampledEnvironment;