Skip to content

Commit 07b8d8d

Browse files
committed
implementation note re silhouette normals
1 parent e3e4cc5 commit 07b8d8d

File tree

1 file changed

+2
-0
lines changed
  • extensions/2.0/Vendor/EXT_mesh_primitive_edge_visibility

1 file changed

+2
-0
lines changed

extensions/2.0/Vendor/EXT_mesh_primitive_edge_visibility/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,5 @@ The `silhouetteNormals` property **MUST** be defined *if and only if* at least o
219219
The [pull request](https://github.com/iTwin/itwinjs-core/pull/5581) that informed the design of this extension provides [an iterator](https://github.com/iTwin/itwinjs-core/blob/03b760e1e91bde5221aa7370ea45c52f966e3368/core/frontend/src/common/imdl/CompactEdges.ts#L42) over the `visibility` buffer.
220220

221221
iTwin.js [implements](https://github.com/iTwin/itwinjs-core/blob/03b760e1e91bde5221aa7370ea45c52f966e3368/core/frontend/src/internal/render/webgl/glsl/Edge.ts#L107) conditional display of silhouette edges. It also draws edges in a separate pass from surfaces to [mitigate z-fighting](https://github.com/iTwin/itwinjs-core/blob/03b760e1e91bde5221aa7370ea45c52f966e3368/core/frontend/src/internal/render/webgl/glsl/FeatureSymbology.ts#L426).
222+
223+
Assets containing silhouette edges tend to contain *a lot* of them. Using component type 5120 (byte) to encode the silhouette normal vectors is recommended to minimize their impact on the size of the glTF asset. Using `EXT_meshopt_compression` can further reduce the transmission size.

0 commit comments

Comments
 (0)