Function: hdrToLdr()
hdrToLdr(
hdrData,width,height,options?):Uint8Array
Convert HDR float data to LDR (Low Dynamic Range) uint8 data using tone mapping
Uses unified tone mapping (Reinhard or ACES) with sRGB output transfer.
Parameters
hdrData
Float32Array
Float32Array of RGBA pixel data [R, G, B, A, R, G, B, A, ...] where A is always 1.0
width
number
Image width in pixels
height
number
Image height in pixels
options?
HDRToLDROptions = {}
Tone mapping options (toneMapping, exposure)
Returns
Uint8Array
Uint8Array containing uint8 RGB data in sRGB, ready for image encoding