Skip to content

Commit 9746de8

Browse files
committed
silhouette mates => silhouette normals
1 parent 96aa219 commit 9746de8

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

extensions/2.0/Vendor/EXT_mesh_primitive_edge_visibility/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The extension's `visibility` property specifies the index of an accessor of `SCA
8282

8383
Edges are often shared between multiple adjacent triangles, which could lead to redunant encoding of their visibilities. For example, if the shared edge between two triangles was encoded as `2` twice, an engine might produce two graphical representations of the edge when one would suffice, or be forced to manually detect and rectify the redundancy. The following rules enable engines to handle shared edges more efficiently:
8484
- A hard edge **MUST** be encoded as `2` exactly once in `visibility`. All other occurrences of the same edge **MUST** be encoded as `3`.
85-
- A silhouette edge **MUST** be encoded as `1` exactly once in `visibility`. All other occurrences of the same edge **MUST** be encoded as `0`. Silhouette edges are shared by definition, and engines can directly access the opposite triangle via the [silhouetteMates](#silhouette-mates) property.
85+
- A silhouette edge **MUST** be encoded as `1` exactly once in `visibility`. All other occurrences of the same edge **MUST** be encoded as `0`
8686

8787
The bitfield **MUST** contain at least one non-zero visibility value.
8888

@@ -192,13 +192,11 @@ Assume that the top edge is to be drawn using the same material as the vertical
192192
}
193193
```
194194

195-
### Silhouette Mates
195+
### Silhouette Normals
196196

197-
A silhouette edge represents the edge between two vertices shared by a pair of adjacent triangles. An engine can directly obtain the indices of one of those triangles based on the `visibility` encoding, but to conditionally render the silhouette it also needs to know the third (unshared) vertex of the other triangle so that it can determine each triangle's facing relative to the camera.
197+
The extension's `silhouetteNormals` property specifies the index of an accessor of `SCALAR` type and component type 5123 (unsigned short) providing normal vectors used to determine the visibility of silhouette edges at display time. For each edge encoded as a silhouette (visibility value `1`) in `visibility`, the silhouette normals buffer provides the two outward-facing normal vectors of the pair of triangles sharing the edge. Each normal vector is compressed into 16 bits using the "oct16" encoding described [here](https://jcgt.org/published/0003/02/01/). The ordering of the normal vector pairs corresponds to the ordering of the edges in `visibility`; that is, the first pair of normals corresponds to the first edge encoded with visibility `1`, the second pair to the second occurrence of visibility `1`; and so on. The accessor's `count` **MUST** be twice the number of edges encoded with visibility value `1`.
198198

199-
The extension's `silhouetteMates` property specifices the index of an accessor of `SCALAR` type and component type `UNSIGNED_BYTE` (5121), `UNSIGNED_SHORT` (5123), or `UNSIGNED_INT` (5125) encoding indices into the triangle mesh's vertex attribute array. Each index refers to the unshared vertex of the other triangle adjacent to the `nth` silhouette edge encoded in `visibility`. The accessor's `count` **MUST** be equal to the number of edges encoded with visibility value `1`.
200-
201-
The `silhouetteMates` property **MUST** be defined *if and only if* at least one edge is encoded with visibility value `1` in `visibility`.
199+
The `silhouetteNormals` property **MUST** be defined *if and only if* at least one edge is encoded with visibility value `1` in `visibility`.
202200

203201
Engines **MUST** render a silhouette edge unless both adjacent triangles are front-facing or both are back-facing, as determined by their normal vectors.
204202

extensions/2.0/Vendor/EXT_mesh_primitive_edge_visibility/schema/primitive.EXT_mesh_primitive_edge_visibility.schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
"description": "The index of a glTF material with which the edges are to be drawn.",
2828
"gltf_detailedDescription": "The index of a glTF material with which the edges are to be drawn. If omitted, the edges are drawn using the same material as the triangle mesh primitive."
2929
},
30-
"silhouetteMates": {
30+
"silhouetteNormals": {
3131
"allOf": [
3232
{
3333
"$ref": "glTFid.schema.json"
3434
}
3535
],
36-
"description": "The index of the accessor encoding the index of the fourth vertex for the pair of triangles sharing each silhouette edge (visibility 1) encoded in `visibility`.",
36+
"description": "The index of the accessor encoding the pair of outward-facing normals for the two faces sharing each silhouette edge (visibility 1) encoded in `visibility`.",
3737
"gltf_detailedDescription": "This property **MUST** be defined if and only if `visibility` encodes at least one edge with visibility value `1`."
3838
},
3939
"lineStrings": {
@@ -48,4 +48,4 @@
4848
"extensions": {},
4949
"extras": {}
5050
}
51-
}
51+
}

0 commit comments

Comments
 (0)