-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
EXT_accessor_additional_types #2395
Open
spnda
wants to merge
1
commit into
KhronosGroup:main
Choose a base branch
from
spnda:EXT_accessor_additional_types
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
extensions/2.0/Vendor/EXT_accessor_additional_types/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# EXT\_accessor\_additional\_types | ||
|
||
## Contributors | ||
|
||
- Sean, [@spnda](https://github.com/spnda) | ||
|
||
## Status | ||
|
||
Draft | ||
|
||
## Dependencies | ||
|
||
Written against the glTF 2.0 spec. | ||
|
||
## Overview | ||
|
||
Similarly to the `KHR_mesh_quantization` extension, this extension offers additional accessor data types for use-cases where the traditional values either offer too much precision, and are therefore wasting memory, or offer too little precision. | ||
|
||
This extension expands the list of component types to additionally support 16-bit half-precision floats, which are commonly used for UV texture coordinates, and for larger data types, such as 64-bit double precision floats, and 64-bit integers. | ||
|
||
This extension adds an exhaustive list of all currently supportable types, so that other extensions can make use of them for different use-cases. Additionally, this extension also allows 16-bit half-precision floats as an additional type for UV texture coordinates, as they are commonly used to optimise memory usage, since they often have next to no effect on quality, and is supported by most modern GPUs and graphics APIs. | ||
|
||
Assets that make use of this extension must mark it as required, as it cannot be optional, since there is no method of switching component types based on supported extensions. | ||
|
||
## Extending Accessor Data Types | ||
|
||
When the `EXT_accessor_additional_types` extension is supported, the following **extra** accessor data types are allowed for usage in accessors in addition to the types defined in [Section 3.6.2.2](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#accessor-data-types). | ||
|
||
|componentType|Data type|Signed|Bits| | ||
|-------------|---------|------|----| | ||
|5124|signed int|Signed, two’s complement|32| | ||
|5130|double|Signed|64| | ||
|5131|half float|Signed|16| | ||
|5135|unsigned long|Unsigned|64| | ||
|
||
The new floating point accessor data types must use IEEE754 double-precision format (binary64) and half-precision format (binary16), respectively. | ||
|
||
## Extending Mesh Attributes | ||
|
||
When `EXT_accessor_additional_types` extension is supported, the following **extra** types are allowed for storing mesh attributes in addition to the types defined in [Section 3.7.2.1](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#meshes-overview). | ||
|
||
|Name|Accessor Type(s)|Component Type(s)| | ||
|----|----------------|-----------------| | ||
|`TEXCOORD_n`|VEC2|_half float_| | ||
|
||
## Extending Morph Target Attributes | ||
|
||
When `EXT_accessor_additional_types` extension is supported, the following **extra** types are allowed for storing morph target attributes in addition to the types defined in [Section 3.7.2.2](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#morph-targets). | ||
|
||
|Name|Accessor Type(s)|Component Type(s)| | ||
|----|----------------|-----------------| | ||
|`TEXCOORD_n`|VEC2|_half float_| |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about 5134 /
0x140E
, for signed long? It seems odd to have signed and unsigned versions of 8-bit, 16-bit, and 32-bit integers, but only have unsigned 64-bit integers. The value0x140E
is defined in OpenGL (line 3202) and in LWJGL.