KhronosGroup / KhronosGroup/WebGL
Using Float16Array
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2.9k
- Forks
- 704
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
I'm on TC39, and I'm working on advancing a proposal for Float16Array in JavaScript, which would hold IEEE binary16 floats. As part of that I'm exploring integration with the rest of the web platform, including WebGL.
I don't have very much experience with WebGL, so please correct me if I'm mistaken about anything here, or otherwise missing context.
I see the texImage2D API accepts Uint16Arrays for ext.HALF_FLOAT_OES types. I would hope that could easily be extended to also accept Float16Array. Is that correct, and would the WebGL group be open to such a change? (Ideally, would someone else be willing to make the change, assuming Float16Array gets added?)
Are there any other places that Float16Arrays could be relevant? I'm especially interested in any places which are currently synthesizing and returning new Uint16Arrays to represent float16 values, since those would be confusing in a world where Float16Array exists - I couldn't find any, but as I said I don't have much experience here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the WebGL texImage2D API and its ext.HALF_FLOAT_OES handling, then compare the Float16Array proposal with existing Uint16Array behavior. The issue names no repository files, tests, or acceptance criteria; the WebGL group would need to define whether Float16Array support and other affected APIs are in scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100