THREE.JS / FOUNDATIONS 127

Color is data.

An environment map is not just an image. Compare LDR and HDR payloads, the color-space annotation attached to them, and the equirectangular-to-PMREM conversion that turns those pixels into PBR lighting.

Initializing -

Creating a synthetic equirectangular payload and PMREM target.

backend
-
input
-
pmrem
-
mapping
-
color space
-
Input contractpayload -> annotation -> filter
Equirectangular sourcewaiting
size
-
typed array
-
GPU type
-
color space
-
mapping
-
bytes
-

DataTexture creates the environment directly from a typed array; no network asset is involved.

PMREM conversionnot generated
class
-
size
-
mapping
-
GPU type
-
color space
-
memory textures
-

PMREM converts the equirectangular source to a CubeUV representation with roughness-aware filtered levels.

LDRclosed domain

Uint8 data stores display-referred values. Correct sRGB annotation enables conversion into the linear working space.

type
UnsignedByte
space
sRGB
HDR floatopen domain

Float32 data preserves values above 1. Linear-sRGB is the correct annotation for lighting calculations.

type
Float32
space
Linear-sRGB
HDR halfbandwidth tradeoff

HalfFloat keeps open-domain highlights with half the channel storage, subject to device support.

type
HalfFloat
space
Linear-sRGB
Conversion and render timingwaiting
PMREM ms
-
CPU frames
-
CPU avg
-
CPU p95
-
source version
-
tex memory
-

PMREM generation is a one-time target-producing operation; the frame sample measures shading after conversion.

typed array -> DataTexture -> equirectangular shader -> PMREMGenerator -> CubeUV -> PBR materials

Color-space metadata is part of the rendering contract. LDR color textures are normally sRGB; open-domain HDR environment data is normally Linear-sRGB. PMREM preserves the lighting representation while changing the sampling layout.

Compare ordinary texture sampler policy next →

LAB 127 / ENVIRONMENT INPUTS + COLOR SPACE