Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add 16-bit float support? #24

Open
reececomo opened this issue Feb 24, 2024 · 0 comments
Open

Feature: Add 16-bit float support? #24

reececomo opened this issue Feb 24, 2024 · 0 comments

Comments

@reececomo
Copy link

reececomo commented Feb 24, 2024

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!

@reececomo reececomo changed the title Feature: Add 16-bit float support Feature: Add 16-bit float support? Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant