Engine API Reference - v2.15.1
    Preparing search index...

    Class FloatPacking

    Utility static class providing functionality to pack float values to various storage representations.

    Index

    Methods

    Methods

    • Packs a float to a 16-bit half-float representation used by the GPU.

      Parameters

      • value: number

        The float value to pack.

      Returns number

      The 16-bit half-float representation as an integer.

      const half = pc.FloatPacking.float2Half(1.5);