Skip to content

Commit

Permalink
Merge pull request #180 from AnalyticalGraphicsInc/clear-coat
Browse files Browse the repository at this point in the history
Add KHR_materials_clearcoat schema
  • Loading branch information
emackey authored Feb 27, 2020
2 parents 09b7568 + 0ffc4db commit 52860b7
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

### 2.2.10 - UNRELEASED

* Add `KHR_materials_clearcoat` extension schema. [#180](https://github.com/AnalyticalGraphicsInc/gltf-vscode/pull/180)

### 2.2.9 - 2020-01-22

* Update Khronos glTF-Validator to 2.0.0-dev.3.2. [KhronosGroup/glTF-Validator#129](https://github.com/KhronosGroup/glTF-Validator/pull/129) and [KhronosGroup/glTF-Validator#131](https://github.com/KhronosGroup/glTF-Validator/pull/131)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Certain glTF 2.0 extensions are supported by JSON schema validation in VSCode.

* `KHR_draco_mesh_compression`
* `KHR_lights_punctual`
* `KHR_materials_clearcoat`
* `KHR_materials_pbrSpecularGlossiness`
* `KHR_materials_unlit`
* `KHR_techniques_webgl` (Draft)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "KHR_materials_clearcoat glTF extension",
"type" : "object",
"description" : "glTF extension that defines the clearcoat material layer.",
"allOf" : [
{
"$ref" : "../../glTFProperty.schema.json"
}
],
"properties" : {
"clearcoatFactor" : {
"type" : "number",
"description" : "The clearcoat layer intensity (aka opacity) of the material. A value of 0.0 means the material has no clearcoat layer enabled.",
"default" : 0,
"minimum" : 0,
"maximum" : 1,
"short_description" : "The clearcoat layer intensity."
},
"clearcoatTexture" : {
"allOf" : [
{
"$ref" : "../../textureInfo.schema.json"
}
],
"description" : "The clearcoat layer intensity texture. These values are sampled from the R channel. The values are linear. Use value 1.0 if no texture is supplied.",
"short_description" : "The clearcoat layer intensity texture."
},
"clearcoatRoughnessFactor" : {
"type" : "number",
"description" : "The clearcoat layer roughness of the material.",
"default" : 0,
"minimum" : 0,
"maximum" : 1,
"short_description" : "The clearcoat layer roughness."
},
"clearcoatRoughnessTexture" : {
"allOf" : [
{
"$ref" : "../../textureInfo.schema.json"
}
],
"description" : "The clearcoat layer roughness texture. These values are sampled from the G channel. The values are linear. Use value 1.0 if no texture is supplied.",
"short_description" : "The clearcoat layer roughness texture."
},
"clearcoatNormalTexture" : {
"allOf" : [
{
"$ref" : "../../material.normalTextureInfo.schema.json"
}
],
"description" : "A tangent space normal map for the clearcoat layer. If desired, this may be a reference to the same normal map used by the base material. If not supplied, no normal mapping is applied to the clear coat layer.",
"short_description" : "The clearcoat normal map texture."
},
"extensions" : {},
"extras" : {}
}
}
7 changes: 7 additions & 0 deletions schemas/gltf-2.0/material.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
"name" : {},
"extensions" : {
"properties" : {
"KHR_materials_clearcoat" : {
"allOf" : [
{
"$ref" : "extensions/KHR_materials_clearcoat/glTF.KHR_materials_clearcoat.schema.json"
}
]
},
"KHR_materials_pbrSpecularGlossiness" : {
"allOf" : [
{
Expand Down
1 change: 1 addition & 0 deletions util/extensionMap2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"material": {
"title": "Material Extensions",
"extensions": {
"KHR_materials_clearcoat": "glTF.KHR_materials_clearcoat.schema.json",
"KHR_materials_pbrSpecularGlossiness": "glTF.KHR_materials_pbrSpecularGlossiness.schema.json",
"KHR_materials_unlit": "glTF.KHR_materials_unlit.schema.json"
}
Expand Down
2 changes: 2 additions & 0 deletions util/importAll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo "~~~ KHR_draco_mesh_compression ~~~"
./importSchema.js -i ../../glTF/extensions/2.0/Khronos/KHR_draco_mesh_compression/schema -o ../schemas/gltf-2.0/extensions/KHR_draco_mesh_compression -s ../../
echo "~~~ KHR_lights_punctual ~~~"
./importSchema.js -i ../../glTF/extensions/2.0/Khronos/KHR_lights_punctual/schema -o ../schemas/gltf-2.0/extensions/KHR_lights_punctual -s ../../
echo "~~~ KHR_materials_clearcoat ~~~"
./importSchema.js -i ../../glTF/extensions/2.0/Khronos/KHR_materials_clearcoat/schema -o ../schemas/gltf-2.0/extensions/KHR_materials_clearcoat -s ../../
echo "~~~ KHR_materials_pbrSpecularGlossiness ~~~"
./importSchema.js -i ../../glTF/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/schema -o ../schemas/gltf-2.0/extensions/KHR_materials_pbrSpecularGlossiness -s ../../
echo "~~~ KHR_materials_unlit ~~~"
Expand Down

0 comments on commit 52860b7

Please sign in to comment.