THREE.JS / FOUNDATIONS 128

Load the light.

File formats change the decoded texture, but the scene still needs an explicit lifecycle: load, annotate, prefilter, rotate, and release the source when the PMREM is enough.

Initializing -

Creating a backend-specific renderer and environment loader comparison.

backend
-
asset
-
loader
-
environment
-
rotation
-
textures
-
Asset lifecycleload -> filter -> rotate -> release
Decoded sourcewaiting
loader
-
file
-
size
-
bytes
-
GPU type
-
color space
-

The source remains available for the raw equirectangular background until it is explicitly released.

PMREM outputnot generated
class
-
size
-
mapping
-
GPU type
-
color space
-
retained
-

PMREM is the lighting representation used by the PBR materials; it can outlive the decoded equirectangular source.

HDRLoaderRGBE -> DataTexture

Parses the official RGBE `.hdr` source and defaults to HalfFloat output for scene-linear lighting data.

asset
venice sunset
space
Linear-sRGB
EXRLoaderOpenEXR -> DataTexture

Parses PIZ-compressed OpenEXR light-probe data; decoded type can be HalfFloat or Float.

asset
piz compressed
space
Linear-sRGB
UltraHDRLoaderJPEG + gain map

Loads the existing Ultra HDR JPEG and reconstructs scene-referred HDR data from its gain-map metadata.

asset
royal esplanade
space
Linear-sRGB
Load, conversion, and render timingwaiting
load ms
-
PMREM ms
-
CPU frames
-
CPU avg
-
CPU p95
-
GPU textures
-

Load time includes fetch and decode; PMREM time is the conversion from equirectangular pixels into filtered CubeUV radiance.

file bytes -> HDR/EXR/UltraHDR loader -> DataTexture -> PMREMGenerator -> Scene.environment -> PBR materials

`Scene.backgroundRotation` and `Scene.environmentRotation` are independent. Releasing the decoded source is safe once the PMREM target is the only representation still needed for lighting.

Compare generated cube capture and PMREM next →

LAB 128 / HDR + EXR LOADERS + ENVIRONMENT LIFECYCLE