Skip to content

Feature: Add 16-bit float support? #24

Open
@reececomo

Description

@reececomo

Hey, thought you/typed-array-buffer-schema may want to eventually add serializing/deserializing half-precision float16s.

We have a float-heavy networked game, and lossy conversion to half floats is mostly negligible, especially on mostly visual quantities. Haven't (yet) noticed any visual pops or extrapolation issues. Did cut our bandwidth down by almost 4x though!

Example buffer conversion logic is here: HalfFloat.ts, where you read/write the value to a buffer as a uint16 - feel free to use/adapt into typed-array-buffer-schema if that's something useful to you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions