From 89c6adf2325c40c6ecc8e3d0692c6ad2896a2b25 Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Thu, 1 Mar 2018 10:43:50 -0800 Subject: [PATCH] fix formatting and typos --- extensions/2.0/Vendor/MSFT_lod/README.md | 40 ++++++++-------- .../MSFT_lod/schema/glTF.MSFT_lod.schema.json | 2 +- .../README.md | 46 +++++++++---------- ...acking_normalRoughnessMetallic.schema.json | 4 +- .../README.md | 26 +++++------ ...ing_occlusionRoughnessMetallic.schema.json | 6 +-- .../2.0/Vendor/MSFT_texture_dds/README.md | 31 ++++++++----- 7 files changed, 81 insertions(+), 74 deletions(-) diff --git a/extensions/2.0/Vendor/MSFT_lod/README.md b/extensions/2.0/Vendor/MSFT_lod/README.md index 2da00ea3f6..3e98d2a810 100644 --- a/extensions/2.0/Vendor/MSFT_lod/README.md +++ b/extensions/2.0/Vendor/MSFT_lod/README.md @@ -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. @@ -77,7 +77,7 @@ A similar pattern can be followed to create `material` LODs: }, "extensions": { "MSFT_lod": { - "ids": [1,2] + "ids": [ 1, 2] } } }, @@ -99,7 +99,7 @@ A similar pattern can be followed to create `material` LODs: }, "normalTexture": { "index": 5 - }, + }, } ] ``` diff --git a/extensions/2.0/Vendor/MSFT_lod/schema/glTF.MSFT_lod.schema.json b/extensions/2.0/Vendor/MSFT_lod/schema/glTF.MSFT_lod.schema.json index 6f2702f2a6..9994b0b1de 100644 --- a/extensions/2.0/Vendor/MSFT_lod/schema/glTF.MSFT_lod.schema.json +++ b/extensions/2.0/Vendor/MSFT_lod/schema/glTF.MSFT_lod.schema.json @@ -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": { diff --git a/extensions/2.0/Vendor/MSFT_packing_normalRoughnessMetallic/README.md b/extensions/2.0/Vendor/MSFT_packing_normalRoughnessMetallic/README.md index 6a2685c7ef..22df747d6a 100644 --- a/extensions/2.0/Vendor/MSFT_packing_normalRoughnessMetallic/README.md +++ b/extensions/2.0/Vendor/MSFT_packing_normalRoughnessMetallic/README.md @@ -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. @@ -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": { @@ -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 @@ -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 } ] diff --git a/extensions/2.0/Vendor/MSFT_packing_normalRoughnessMetallic/schema/glTF.MSFT_packing_normalRoughnessMetallic.schema.json b/extensions/2.0/Vendor/MSFT_packing_normalRoughnessMetallic/schema/glTF.MSFT_packing_normalRoughnessMetallic.schema.json index 548fec4e5c..eaf2e5a95a 100644 --- a/extensions/2.0/Vendor/MSFT_packing_normalRoughnessMetallic/schema/glTF.MSFT_packing_normalRoughnessMetallic.schema.json +++ b/extensions/2.0/Vendor/MSFT_packing_normalRoughnessMetallic/schema/glTF.MSFT_packing_normalRoughnessMetallic.schema.json @@ -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" } ], diff --git a/extensions/2.0/Vendor/MSFT_packing_occlusionRoughnessMetallic/README.md b/extensions/2.0/Vendor/MSFT_packing_occlusionRoughnessMetallic/README.md index 39e78cd74d..0e20b6a48b 100644 --- a/extensions/2.0/Vendor/MSFT_packing_occlusionRoughnessMetallic/README.md +++ b/extensions/2.0/Vendor/MSFT_packing_occlusionRoughnessMetallic/README.md @@ -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. @@ -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": { @@ -61,8 +61,8 @@ 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 @@ -70,19 +70,19 @@ The example below shows how this extension can be used along with the MSFT_textu } }, { - "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 @@ -90,7 +90,7 @@ The example below shows how this extension can be used along with the MSFT_textu } }, { - "name":"normalTexture_RG", + "name": "normalTexture_RG", "extensions": { "MSFT_texture_dds": { "source": 5 diff --git a/extensions/2.0/Vendor/MSFT_packing_occlusionRoughnessMetallic/schema/glTF.MSFT_packing_occlusionRoughnessMetallic.schema.json b/extensions/2.0/Vendor/MSFT_packing_occlusionRoughnessMetallic/schema/glTF.MSFT_packing_occlusionRoughnessMetallic.schema.json index e2a7adae56..e8f05e6711 100644 --- a/extensions/2.0/Vendor/MSFT_packing_occlusionRoughnessMetallic/schema/glTF.MSFT_packing_occlusionRoughnessMetallic.schema.json +++ b/extensions/2.0/Vendor/MSFT_packing_occlusionRoughnessMetallic/schema/glTF.MSFT_packing_occlusionRoughnessMetallic.schema.json @@ -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" } ], @@ -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" } ], diff --git a/extensions/2.0/Vendor/MSFT_texture_dds/README.md b/extensions/2.0/Vendor/MSFT_texture_dds/README.md index 9ba37adbac..1372d55397 100644 --- a/extensions/2.0/Vendor/MSFT_texture_dds/README.md +++ b/extensions/2.0/Vendor/MSFT_texture_dds/README.md @@ -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*. @@ -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. \ No newline at end of file