Skip to content

Commit

Permalink
Merge pull request #40 from javagl/ext-mesh-features-only-feature-ids
Browse files Browse the repository at this point in the history
Clarification for only using feature IDs
  • Loading branch information
ptrgags authored and nithinp7 committed Feb 15, 2022
2 parents ee31940 + 9f8c97a commit a567dec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion extensions/2.0/Vendor/EXT_mesh_features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ Each feature ID definition may include only a single source, so the following ar
- `featureId.offset` and `featureId.repeat` (for a Feature ID Attribute)
- `featureId.index` (for a Feature ID Texture)
Every `propertyTables` index must have an associated `featureIds` definition, but feature IDs may be defined without a property table. The `propertyTables` entry at index `i` corresponds to the `featureIds` entry at the same index. As a result, the length of the `featureIds` array must be greater than or equal to the length of the `propertyTables` array. Each (`featureId`, `propertyTable`) pair must be unique, but individual feature IDs and property tables may be repeated within a primitive or node.
Primitives may contain `featureIds` entries for vertex attribute and texture-based feature IDs, and Nodes may contain `featureIds` entries for GPU instance attributes.
#### Referencing Property Tables with Feature IDs
When feature IDs are associated with property tables, then every `propertyTables` index must have an associated `featureIds` definition. The `propertyTables` entry at index `i` corresponds to the `featureIds` entry at the same index. As a result, the length of the `featureIds` array must be greater than or equal to the length of the `propertyTables` array. Each (`featureId`, `propertyTable`) pair must be unique, but individual feature IDs and property tables may be repeated within a primitive or node.
Empty feature IDs (e.g. `{}`) are disallowed — a feature ID must explicitly set at least one property.
Expand All @@ -267,6 +271,12 @@ Empty feature IDs (e.g. `{}`) are disallowed — a feature ID must explicitly se
> }
> ```
#### Referencing External Resources with Feature IDs
Feature IDs do not have to be associated with a property table. Without a property table, IDs may identify features for use in other extensions or in custom applications. Use cases for these IDs extend beyond the scope of this extension, but could include identifying features for styling or picking, or looking up metadata externally in a REST API or database.
> <img src="figures/feature-id-lookup.png" alt="Feature ID lookup" width="800">
## Feature Properties
### Overview
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a567dec

Please sign in to comment.