Common raster color and sampling
Common raster layers support tiled imagery and image/video/canvas sources. Brightness, saturation, contrast, hue and sampling share material logic across flat, pitched, globe and terrain rendering, preserving source pixels and layer identities.
map.setPaintProperty('imagery', 'raster-brightness-min', 0);
map.setPaintProperty('imagery', 'raster-brightness-max', 1);
map.setPaintProperty('imagery', 'raster-saturation', -1); // Grayscale
map.setPaintProperty('imagery', 'raster-contrast', 0.2);
map.setPaintProperty('imagery', 'raster-hue-rotate', 0);
map.setPaintProperty('imagery', 'raster-resampling', 'nearest');
await map.sqs.flush({ render: true });
Brightness min/max range0–1 and default0/1; saturation/contrast range-1–1 and default0. Hue rotation accepts degrees within±1 billion, normalized before drawing, default0. Numeric options accept supported zoom expressions. Raster materials do not accept feature properties/state. Resampling accepts linear(default) or nearest. Opacity is still applied once.
Colors are adjusted in encoded RGB before existing lighting/fog. Globe/terrain lighting may change final brightness. Material edits update controls/sampling without fetching or mutating source data. Sampling changes rebuild the texture binding correctly.
Raw browser SDK callers use view.flush(). Common scripts share these methods; native libraries use the common layer JSON entry. Rust callers retain previous behavior with default SceneRasterStyle. C ABI is unchanged. Common arrival fades and remaining properties are pending; unsupported values reject explicitly.