Skip to content

Commit

Permalink
fix formatting and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
sbtron committed Mar 1, 2018
1 parent 834af32 commit 89c6adf
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 74 deletions.
40 changes: 20 additions & 20 deletions extensions/2.0/Vendor/MSFT_lod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ An implementation of this extension can parse through the `ids` array to create
The following example shows how the `MSFT_lod` extension can be specified at the `node` level to create three LOD levels:
```json
"nodes": [
{
"name": "High_LOD",
"mesh": 0,
"extensions": {
"MSFT_lod": {
"ids": [ 1, 2 ]
}
},
"extras": {
"MSFT_screencoverage": [ 0.5, 0.2 , 0.01]
{
"name": "High_LOD",
"mesh": 0,
"extensions": {
"MSFT_lod": {
"ids": [ 1, 2]
}
},
{
"name": "Medium_LOD",
"mesh": 1
},
{
"name": "Low_LOD",
"mesh": 2
"extras": {
"MSFT_screencoverage": [0.5, 0.2, 0.01]
}
]
},
{
"name": "Medium_LOD",
"mesh": 1
},
{
"name": "Low_LOD",
"mesh": 2
}
]
```
Since the `MSFT_lod` extension is specified in `node[0]`, it becomes the highest LOD. The first element in the `ids` array is *1*, making `node[1]` the next lower LOD (or the *Medium_LOD*). The second element in the `ids` array is *2*, making `node[2]` the lowest LOD for this sample.

Expand All @@ -77,7 +77,7 @@ A similar pattern can be followed to create `material` LODs:
},
"extensions": {
"MSFT_lod": {
"ids": [1,2]
"ids": [ 1, 2]
}
}
},
Expand All @@ -99,7 +99,7 @@ A similar pattern can be followed to create `material` LODs:
},
"normalTexture": {
"index": 5
},
},
}
]
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-04/schema",
"title": "MSFT_lod glTF extension",
"type": "object",
"description": "glTF extension for specifying Levels of Detail.",
"description": "glTF extension for specifying levels of detail (LOD).",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
"properties": {
"ids": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Written against the glTF 2.0 spec.

This extension adds support for alternate texture packing and is meant to be used for Windows Mixed Reality Home and 3D Launchers for Windows Mixed Reality.

This extension defines an additional property for `normalRoughnessMetallicTexture`. This property specifies the index of a texture with the packing Normal (RG), Roughness (B), Metallic (A). This specialized packing is meant to provide an optimized alternative to the one specified in the core glTF 2.0 specification.
This extension defines an additional property for `normalRoughnessMetallicTexture`. This property specifies the index of a texture with the packing Normal (RG), Roughness (B), Metallic (A). This specialized packing is meant to provide an optimized alternative to the one specified in the core glTF 2.0 specification.

The extension should only be used when creating glTF assets for engines that support this packing and is not meant to be a general purpose packing extension. Any client that does not support this extension can safely ignore these additional packed texture and rely on the default packing in glTF 2.0. This extension can also be used along with other extensions like [MSFT_texture_dds](../MSFT_texture_dds/README.md) to store the packed textures in DDS files.

Expand All @@ -34,8 +34,8 @@ The example below shows how this extension can be used along with the MSFT_textu
"baseColorTexture": {
"index": 0
},
"roughnessMetallicTexture": {
"index": 1
"roughnessMetallicTexture": {
"index": 1
}
},
"normalTexture": {
Expand All @@ -52,24 +52,24 @@ The example below shows how this extension can be used along with the MSFT_textu
],
"textures": [
{
"name":"baseColorTexture",
"source":0,
"name": "baseColorTexture",
"source": 0,
"extensions": {
"MSFT_texture_dds": {
"source": 3
}
}
},
{
"name":"roughnessMetallicTexture",
"source":1
{
"name": "roughnessMetallicTexture",
"source": 1
},
{
"name":"normalTexture",
"source":2
{
"name": "normalTexture",
"source": 2
},
{
"name":"normalRoughnessMetallic",
{
"name": "normalRoughnessMetallic",
"extensions": {
"MSFT_texture_dds": {
"source": 4
Expand All @@ -79,28 +79,28 @@ The example below shows how this extension can be used along with the MSFT_textu
],
"images": [
{
"name":"baseColorTexture.png",
"mimeType": "image/png",
"name": "baseColorTexture.png",
"mimeType": "image/png",
"bufferView": 0
},
{
"name":"roughnessMetallicTexture.png",
"mimeType": "image/png",
"name": "roughnessMetallicTexture.png",
"mimeType": "image/png",
"bufferView": 1
},
{
"name":"normalTexture.png",
"mimeType": "image/png",
"name": "normalTexture.png",
"mimeType": "image/png",
"bufferView": 2
},
{
"name":"baseColorTexture.dds",
"mimeType": "image/vnd-ms.dds",
"name": "baseColorTexture.dds",
"mimeType": "image/vnd-ms.dds",
"bufferView": 3
},
{
"name":"normalRoughnessMetallic.dds",
"mimeType": "image/vnd-ms.dds",
"name": "normalRoughnessMetallic.dds",
"mimeType": "image/vnd-ms.dds",
"bufferView": 4
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"$schema": "http://json-schema.org/draft-04/schema",
"title": "MSFT_packing_normalRoughnessMetallic extension",
"type": "object",
"description": "glTF extension the specifies a packing of normalRoughnessMetallic in a single texture.",
"description": "glTF extension the specifies a packing of normal, roughness and metallic in a single texture.",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
"properties": {
"normalRoughnessMetallicTexture": {
"type": "object",
"description": "A texture with the packing Normal (RG), Roughness (B), Metallic (A).",
"description": "A texture with the packing Normal (RG), Roughness (B), Metallic (A).",
"properties": {
"index": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Written against the glTF 2.0 spec.
This extension adds support for alternate texture packing and is meant to be used for Windows Mixed Reality Home and 3D Launchers for Windows Mixed Reality.

This extension defines three additional properties:
- `occlusionRoughnessMetallicTexture`: Specifies the index of a texture with the packing Occlusion (R), Roughness (G), Metallic (B)
- `roughnessMetallicOcclusionTexture`: Specifies the index of a texture with the packing Roughness (R), Metallic (G), Occlusion (B)
- `occlusionRoughnessMetallicTexture`: Specifies the index of a texture with the packing Occlusion (R), Roughness (G), Metallic (B)
- `roughnessMetallicOcclusionTexture`: Specifies the index of a texture with the packing Roughness (R), Metallic (G), Occlusion (B)
- `normalTexture`: Specifies the index of a texture which contains two channel (RG) normal map.

The extension should only be used when creating glTF assets for engines that support this packing and is not meant to be a general purpose packing extension. Any client that does not support this extension can safely ignore these additional packed textures and rely on the default packing in glTF 2.0. This extension can also be used along with other extensions like [MSFT_texture_dds](../MSFT_texture_dds/README.md) to store the packed textures in DDS files.
Expand All @@ -38,7 +38,7 @@ The example below shows how this extension can be used along with the MSFT_textu
"index": 0
},
"roughnessMetallicTexture": {
"index": 1
"index": 1
},
},
"normalTexture": {
Expand All @@ -61,36 +61,36 @@ The example below shows how this extension can be used along with the MSFT_textu
],
"textures": [
{
"name":"baseColorTexture",
"source":0,
"name": "baseColorTexture",
"source": 0,
"extensions": {
"MSFT_texture_dds": {
"source": 6
}
}
},
{
"name":"roughnessMetallicTexture",
"source":1
"name": "roughnessMetallicTexture",
"source": 1
},
{
"name":"normalTexture",
"source":2
"name": "normalTexture",
"source": 2
},
{
"name":"occlusionTexture",
"source":3
"name": "occlusionTexture",
"source": 3
},
{
"name":"occlusionRoughnessMetallic",
"name": "occlusionRoughnessMetallic",
"extensions": {
"MSFT_texture_dds": {
"source": 4
}
}
},
{
"name":"normalTexture_RG",
"name": "normalTexture_RG",
"extensions": {
"MSFT_texture_dds": {
"source": 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"$schema": "http://json-schema.org/draft-04/schema",
"title": "MSFT_packing_occlusionRoughnessMetallic extension",
"type": "object",
"description": "glTF extension the specifies a packing of occlusionRoughnessMetallic in a single texture and a two channel normal map.",
"description": "glTF extension the specifies a packing of occlusion, roughness and metallic in a single texture and a two channel normal map.",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
"properties": {
"occlusionRoughnessMetallicTexture": {
"type": "object",
"description": "A texture with packing Occlusion (R), Roughness (G), Metallic (B).",
"description": "A texture with packing Occlusion (R), Roughness (G), Metallic (B).",
"properties": {
"index": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
Expand All @@ -17,7 +17,7 @@
},
"roughnessMetallicOcclusionTexture": {
"type": "object",
"description": "A texture with packing Roughness (R), Metallic (G), Occlusion (B).",
"description": "A texture with packing Roughness (R), Metallic (G), Occlusion (B).",
"properties": {
"index": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
Expand Down
31 changes: 19 additions & 12 deletions extensions/2.0/Vendor/MSFT_texture_dds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ The extension is added to the `textures` node and specifies a `source` property
"source": 0,
"extensions": {
"MSFT_texture_dds": {
"source": 1
}
"source": 1
}
}
}
],
],
"images": [
{
"uri": "defaultTexture.png"
"uri": "defaultTexture.png"
},
{
"uri": "DDSTexture.dds"
"uri": "DDSTexture.dds"
}
]
```
When used in the glTF Binary (.glb) format the `images` node that points to the DDS file uses the `mimeType` value of *image/vnd-ms.dds*.

Expand All @@ -49,21 +50,27 @@ When used in the glTF Binary (.glb) format the `images` node that points to the
"source": 0,
"extensions": {
"MSFT_texture_dds": {
"source": 1
}
"source": 1
}
}
}
],
],
"images": [
{
"mimeType": "image/png",
"bufferView": 1
"mimeType": "image/png",
"bufferView": 1
},
{
"mimeType": "image/vnd-ms.dds",
"bufferView": 2
"mimeType": "image/vnd-ms.dds",
"bufferView": 2
}
]
```

## glTF Schema Updates

* **JSON schema**: [glTF.MSFT_texture_dds.schema.json](schema/glTF.MSFT_texture_dds.schema.json)

## Known Implementations

This extension is used by Windows Mixed Reality Home and 3D Launchers for Windows Mixed Reality to improve performance by including DDS textures. [glTF-Toolkit](https://github.com/Microsoft/glTF-Toolkit) can be used to generate files that use this extension.

0 comments on commit 89c6adf

Please sign in to comment.