Compute hillshade illumination for a terrain grid.
Implements the standard hillshade algorithm used in GIS:
heights
Float32Array
width
height
azimuth_deg
altitude_deg
Uint8Array of illumination values (0 = shadow, 255 = full light).
Uint8Array
Compute hillshade illumination for a terrain grid.
Implements the standard hillshade algorithm used in GIS:
Arguments
heights:Float32Arrayelevation grid (row-major)width: Grid width (columns)height: Grid height (rows)azimuth_deg: Light azimuth in degrees (0 = North, 90 = East)altitude_deg: Light altitude/elevation in degrees (90 = directly above)Returns
Uint8Arrayof illumination values (0 = shadow, 255 = full light).