Skip to main content

encode_unit3_hemioct

encode_unit_to_hemioct(output, output_offset, x, y, z)

Assume normalized input on +Z hemisphere. Output is on [-1, 1].

Uses hemi-octahedron for sphere approximation

Kind: global function
See: A Survey of Efficient Representations for Independent Unit Vectors (Journal of Computer Graphics Techniques Vol. 3, No. 2, 2014)

ParamType
outputArray.<number>
output_offsetnumber
xnumber
ynumber
znumber