Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update material and technique schema #419

Merged
merged 3 commits into from
Oct 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 10 additions & 20 deletions specification/schema/examples/materials.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
{
"materials" : {
"material_id": {
"instanceTechnique": {
"technique": "technique_id",
"values": {
"ambient": [
0,
0,
0,
1
],
"diffuse": "texture_image_0",
"shininess": 38.4
},
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
},
"extras" : {
"Application specific" : "The extra object can contain any properties."
}
"technique": "technique_id",
"values": {
"ambient": [
0,
0,
0,
1
],
"diffuse": "texture_image_0",
"shininess": 38.4
},
"name": "user-defined material name",
"extensions" : {
Expand Down
149 changes: 46 additions & 103 deletions specification/schema/examples/techniques.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,112 +68,55 @@
"type": 35666
}
},
"pass" : "pass_id",
"passes" : {
"pass_id" : {
"details": {
"commonProfile": {
"lightingModel": "Blinn",
"parameters": [
"ambient",
"diffuse",
"lightColor",
"lightTransform",
"modelViewMatrix",
"projectionMatrix",
"normalMatrix"
],
"texcoordBindings": {
"diffuse": "TEXCOORD_0"
},
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
},
"extras": {
"doubleSided": false
}
},
"type": "COLLADA-1.4.1/commonProfile",
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
},
"extras" : {
"Application specific" : "The extra object can contain any properties."
}
},
"instanceProgram": {
"attributes": {
"a_position": "position",
"a_normal": "normal",
"a_texcoord0": "texcoord0",
"a_joint": "joint",
"a_jointMatrix": "jointMatrix",
"a_weight": "weight"
},
"program": "program_id",
"uniforms": {
"u_ambient": "ambient",
"u_diffuse": "diffuse",
"u_lightColor": "lightColor",
"u_lightTransformMatrix": "lightTransform",
"u_modelViewMatrix": "modelViewMatrix",
"u_projectionMatrix": "projectionMatrix",
"u_normalMatrix": "normalMatrix"
},
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
},
"extras" : {
"Application specific" : "The extra object can contain any properties."
}
},
"states" : {
"enable" : [3042, 2884, 2929, 32823, 32926, 3089],
"functions" : {
"blendColor": [0.0, 0.0, 0.0, 0.0],
"blendEquationSeparate" : [32774, 32774],
"blendFuncSeparate" : [1, 1, 0, 0],
"colorMask" : [true, true, true, true],
"cullFace" : [1029],
"depthFunc" : [513],
"depthMask" : [true],
"depthRange" : [0.0, 1.0],
"frontFace" : [2305],
"lineWidth" : [1.0],
"polygonOffset" : [0.0, 0.0],
"scissor" : [0, 0, 0, 0],
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
},
"extras" : {
"Application specific" : "The extra object can contain any properties."
}
},
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
},
"extras" : {
"Application specific" : "The extra object can contain any properties."
}
"attributes": {
"a_position": "position",
"a_normal": "normal",
"a_texcoord0": "texcoord0",
"a_joint": "joint",
"a_jointMatrix": "jointMatrix",
"a_weight": "weight"
},
"program": "program_id",
"uniforms": {
"u_ambient": "ambient",
"u_diffuse": "diffuse",
"u_lightColor": "lightColor",
"u_lightTransformMatrix": "lightTransform",
"u_modelViewMatrix": "modelViewMatrix",
"u_projectionMatrix": "projectionMatrix",
"u_normalMatrix": "normalMatrix"
},
"states" : {
"enable" : [3042, 2884, 2929, 32823, 32926, 3089],
"functions" : {
"blendColor": [0.0, 0.0, 0.0, 0.0],
"blendEquationSeparate" : [32774, 32774],
"blendFuncSeparate" : [1, 1, 0, 0],
"colorMask" : [true, true, true, true],
"cullFace" : [1029],
"depthFunc" : [513],
"depthMask" : [true],
"depthRange" : [0.0, 1.0],
"frontFace" : [2305],
"lineWidth" : [1.0],
"polygonOffset" : [0.0, 0.0],
"scissor" : [0, 0, 0, 0],
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
},
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
},
"extras" : {
"Application specific" : "The extra object can contain any properties."
}
}
},
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
},
"extras" : {
"Application specific" : "The extra object can contain any properties."
}
},
"extensions" : {
Expand Down
15 changes: 11 additions & 4 deletions specification/schema/material.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@
"description" : "An instance of a technique with parameter value overrides.",
"extends" : { "$ref" : "glTFChildOfRootProperty.schema.json" },
"properties": {
"instanceTechnique" : {
"extends" : { "$ref" : "materialInstanceTechnique.schema.json" },
"description" : "An instance of a technique with parameter value overrides.",
"required" : true
"technique" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"description" : "The id (JSON property name) of the technique. TODO: define technique when this is undefined",
},
"values" : {
"properties" : {
},
"additionalProperties" : {
"$ref" : "materialValues.schema.json"
},
"default" : {}
}
},
"additionalProperties" : false
Expand Down
22 changes: 0 additions & 22 deletions specification/schema/materialInstanceTechnique.schema.json

This file was deleted.

23 changes: 18 additions & 5 deletions specification/schema/technique.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,31 @@
},
"default" : {}
},
"pass" : {
"attributes" : {
"properties" : {
},
"additionalProperties" : {
"$ref" : "techniqueAttribute.schema.json"
},
"default" : {}
},
"program" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"description" : "The id (JSON property name) of the default pass to use.",
"description" : "Specifies the program id (property name).",
"required" : true
},
"passes" : {
"uniforms" : {
"properties" : {
},
"additionalProperties" : {
"$ref" : "techniquePass.schema.json"
"$ref" : "techniqueUniform.schema.json"
},
"required" : true
"default" : {}
},
"states" : {
"extends" : { "$ref" : "techniqueStates.schema.json" },
"description" : "Fixed-function rendering states.",
"default" : {}
}
},
"additionalProperties" : false
Expand Down
24 changes: 0 additions & 24 deletions specification/schema/techniquePass.schema.json

This file was deleted.

17 changes: 0 additions & 17 deletions specification/schema/techniquePassDetails.schema.json

This file was deleted.

30 changes: 0 additions & 30 deletions specification/schema/techniquePassDetailsCommonProfile.schema.json

This file was deleted.

This file was deleted.

30 changes: 0 additions & 30 deletions specification/schema/techniquePassInstanceProgram.schema.json

This file was deleted.