Skip to content

Commit

Permalink
Merged visualquality into sandcastle
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcozzi committed Aug 2, 2012
2 parents a635cd8 + 352ef68 commit 6c79e14
Show file tree
Hide file tree
Showing 99 changed files with 4,922 additions and 1,941 deletions.
4 changes: 2 additions & 2 deletions .project
Expand Up @@ -104,9 +104,9 @@
</matcher>
</filter>
<filter>
<id>1334962574946</id>
<id>1338843689105</id>
<name>Source/Shaders</name>
<type>6</type>
<type>22</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-*.js</arguments>
Expand Down
2 changes: 1 addition & 1 deletion Apps/CesiumViewer/CesiumViewer.js
Expand Up @@ -34,4 +34,4 @@ define([
}
}).placeAt(dom.byId('cesiumContainer'));
});
});
});
149 changes: 87 additions & 62 deletions CHANGES.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Documentation/Schemas/Fabric/Examples/Components.json
@@ -0,0 +1,9 @@
{
"components": {
"diffuse" : "vec3(0.0)",
"specular" : "0.0",
"normal" : "normalize(vec3(1.0))",
"emission" : "vec3(0.0)",
"alpha" : "1.0"
}
}
20 changes: 20 additions & 0 deletions Documentation/Schemas/Fabric/Examples/MaterialHierarchy.json
@@ -0,0 +1,20 @@
{
"materials" : {
"hot" : {
"components" : {
"diffuse" : "vec3(1.0, 0.0, 0.0)"
}
},
"cold" : {
"components" : {
"diffuse" : "vec3(0.0, 1.0, 0.0)"
}
}
},
"uniforms" : {
"temperature" : 0.5
},
"components" : {
"diffuse" : "mix(cold.diffuse, hot.diffuse, temperature)"
}
}
26 changes: 26 additions & 0 deletions Documentation/Schemas/Fabric/Examples/MaterialHierarchy2.json
@@ -0,0 +1,26 @@
{
"materials" : {
"hot" : {
"uniforms" : {
"hot": "hot.jpg"
},
"components" : {
"diffuse" : "texture2D(hot, materialInput.st).rgb"
}
},
"cold" : {
"uniforms" : {
"cold": "cold.jpg"
},
"components" : {
"diffuse" : "texture2D(cold, materialInput.st).rgb"
}
}
},
"uniforms" : {
"temperature" : 0.5
},
"components" : {
"diffuse" : "mix(cold.diffuse, hot.diffuse, temperature)"
}
}
10 changes: 10 additions & 0 deletions Documentation/Schemas/Fabric/Examples/MatrixUniforms.json
@@ -0,0 +1,10 @@
{
"uniforms": {
"mymat2" : [0.0, 1.0, 2.0, 3.0],
"mymat3" : [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0],
"mymat4" : [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0]
},
"components": {
"diffuse" : "vec3(mymat2[0][0], mymat3[0][0], mymat4[0][0])"
}
}
3 changes: 3 additions & 0 deletions Documentation/Schemas/Fabric/Examples/Source.json
@@ -0,0 +1,3 @@
{
"source" : "agi_material agi_getMaterial(agi_materialInput m) { return agi_getDefaultMaterial(m); }"
}
19 changes: 19 additions & 0 deletions Documentation/Schemas/Fabric/Examples/TextureUniforms.json
@@ -0,0 +1,19 @@
{
"uniforms": {
"mytexture2D" : "../../Images/earthspec1k.jpg",
"myothertexture2D" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAC/SURBVDhPrZPRDYQgEEQpjVKuFEvhw0IoxU6QgQwMK+vdx5FsooT3GHdjCM4qZnnnHvvkYoxFi/uvIhwiRCClXFC6v5UQ1uQAsbrkHCLsbaPjFgIzQQc1yUOwu33ePGE3BQUaee2BpjhbP5YUmkAlbNzsAURfBDqJnMIyyv4JjsCCgCnIR32uZUfcJuGBOwEk6bOKhoAADh31EIq3MgFg1mgkE1BA2AoUZoo2iZ3gyqGgmMDC/xWwkfb3/eUd7A1v3kxjNW9taQAAAABJRU5ErkJggg==",
"mycubemap": {
"positiveX" : "posx.jpg",
"negativeX" : "negx.jpg",
"positiveY" : "negy.jpg",
"negativeY" : "posy.jpg",
"positiveZ" : "posz.jpg",
"negativeZ" : "negz.jpg"
}
},
"components": {
"diffuse" : "textureCube(mycubemap, normalize(vec3(1.0))).rgb /* not an interesting reflection */",
"specular" : "texture2D(myothertexture2D, materialInput.st).r",
"emission" : "texture2D(mytexture2D, materialInput.st).rgb"
}
}
27 changes: 27 additions & 0 deletions Documentation/Schemas/Fabric/Examples/VectorUniforms.json
@@ -0,0 +1,27 @@
{
"uniforms": {
"myfloat" : 0.0,
"myvec2" : {
"x" : 0.0,
"y" : 1.0
},
"myvec3" : {
"x" : 0.0,
"y" : 1.0,
"z" : 2.0
},
"myvec4" : {
"x" : 0.0,
"y" : 1.0,
"z" : 2.0,
"w" : 3.0
}
},
"components": {
"diffuse" : "myvec3",
"specular" : "myfloat",
"normal" : "myvec3",
"emission" : "myvec3",
"alpha" : "myfloat"
}
}
27 changes: 27 additions & 0 deletions Documentation/Schemas/Fabric/Examples/VectorUniforms2.json
@@ -0,0 +1,27 @@
{
"uniforms": {
"myfloat" : 0.0,
"myvec2" : {
"r" : 0.0,
"g" : 1.0
},
"myvec3" : {
"r" : 0.0,
"g" : 1.0,
"b" : 2.0
},
"myvec4" : {
"r" : 0.0,
"g" : 1.0,
"b" : 2.0,
"a" : 3.0
}
},
"components": {
"diffuse" : "myvec3",
"specular" : "myfloat",
"normal" : "myvec3",
"emission" : "myvec3",
"alpha" : "myfloat"
}
}
27 changes: 27 additions & 0 deletions Documentation/Schemas/Fabric/Examples/VectorUniforms3.json
@@ -0,0 +1,27 @@
{
"uniforms": {
"myfloat" : 0.0,
"myvec2" : {
"s" : 0.0,
"t" : 1.0
},
"myvec3" : {
"s" : 0.0,
"t" : 1.0,
"p" : 2.0
},
"myvec4" : {
"s" : 0.0,
"t" : 1.0,
"p" : 2.0,
"q" : 3.0
}
},
"components": {
"diffuse" : "myvec3",
"specular" : "myfloat",
"normal" : "myvec3",
"emission" : "myvec3",
"alpha" : "myfloat"
}
}
184 changes: 184 additions & 0 deletions Documentation/Schemas/Fabric/Material.schema.json
@@ -0,0 +1,184 @@
{
"title": "Material",
"description": "A material composed of uniforms, an agi_getMaterial GLSL function, and potentially other materials.",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "A unique identifier for this material type."
},

"materials": {
"type": "object",
"description": "Materials used by this material. This enables building a hierarchy of materials. For example, reflection and refraction materials can be combined to create a Fresnel material, and then the Fresnel material can be combined with a specular map material to create a water material.",
"properties": {
},
"additionalProperties": {
"$ref": "Material.schema.json"
}
},

"uniforms": {
"type": "object",
"description": "Uniform variables, and their default values, that are input to this material. Texture and cube-map face uniform values are specified as an image URL or a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>. Alternatively, a placeholder RGBA white texture can be used by specifying agi_defaultImage or agi_defaultCubeMap for textures or cube-maps, respectively.",
"properties": {
},
"additionalProperties": {
"type": ["string", "number", "integer", "boolean", "object", "array"],

"format": "uri",

"items": {
"type": "number",
"description": "A floating-point component in a mat2, mat3, or mat4."
},
"minItems" : 4,
"maxItems" : 16,

"properties": {
"x": {
"type": ["number", "integer", "boolean"],
"description": "The x component of a floating-point, integer, or boolean vec2, vec3, or vec4."
},
"y": {
"type": ["number", "integer", "boolean"],
"description": "The y component of a floating-point, integer, or boolean vec2, vec3, or vec4."
},
"z": {
"type": ["number", "integer", "boolean"],
"description": "The z component of a floating-point, integer, or boolean vec3 or vec4."
},
"w": {
"type": ["number", "integer", "boolean"],
"description": "The w component of a floating-point, integer, or boolean vec4."
},

"r": {
"type": ["number", "integer", "boolean"],
"description": "The r component of a floating-point, integer, or boolean vec2, vec3, or vec4."
},
"g": {
"type": ["number", "integer", "boolean"],
"description": "The g component of a floating-point, integer, or boolean vec2, vec3, or vec4."
},
"b": {
"type": ["number", "integer", "boolean"],
"description": "The b component of a floating-point, integer, or boolean vec3 or vec4."
},
"a": {
"type": ["number", "integer", "boolean"],
"description": "The a component of a floating-point, integer, or boolean vec4."
},

"s": {
"type": ["number", "integer", "boolean"],
"description": "The r component of a floating-point, integer, or boolean vec2, vec3, or vec4."
},
"t": {
"type": ["number", "integer", "boolean"],
"description": "The g component of a floating-point, integer, or boolean vec2, vec3, or vec4."
},
"p": {
"type": ["number", "integer", "boolean"],
"description": "The b component of a floating-point, integer, or boolean vec3 or vec4."
},
"q": {
"type": ["number", "integer", "boolean"],
"description": "The a component of a floating-point, integer, or boolean vec4."
},

"positiveX": {
"type": "string",
"format": "uri",
"description": "An image for the +x side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
},
"negativeX": {
"type": "string",
"format": "uri",
"description": "An image for the -x side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
},
"positiveY": {
"type": "string",
"format": "uri",
"description": "An image for the +y side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
},
"negativeY": {
"type": "string",
"format": "uri",
"description": "An image for the -y side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
},
"positiveZ": {
"type": "string",
"format": "uri",
"description": "An image for the +z side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
},
"negativeZ": {
"type": "string",
"format": "uri",
"description": "An image for the -z side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
}
},
"dependencies": {
"x": "y",
"y": "x",
"z": ["x", "y"],
"w": ["x", "y", "z"],

"r": "g",
"g": "r",
"b": ["r", "g"],
"a": ["r", "g", "b"],

"s": "t",
"t": "s",
"p": ["s", "t"],
"q": ["s", "t", "p"],

"positiveX": ["negativeX", "positiveY", "negativeY", "positiveZ", "negativeZ"],
"negativeX": ["positiveX", "positiveY", "negativeY", "positiveZ", "negativeZ"],
"positiveY": ["positiveX", "negativeX", "negativeY", "positiveZ", "negativeZ"],
"negativeY": ["positiveX", "negativeX", "positiveY", "positiveZ", "negativeZ"],
"positiveZ": ["positiveX", "negativeX", "positiveY", "negativeY", "negativeZ"],
"negativeZ": ["positiveX", "negativeX", "positiveY", "negativeY", "positiveZ"]
},
"additionalProperties": false
}
},

"components": {
"type": "object",
"description": "The diffuse, specular, normal, emission, and alpha components returned by this material. The components or source property is required, but not both.",
"properties": {
"diffuse" : {
"type": "string",
"default" : "vec3(0.0)",
"description": "A GLSL expression returning the diffuse component of this material. The diffuse component is a vec3 defining incoming light that scatters evenly in all directions."
},
"specular" : {
"type": "string",
"default" : "0.0",
"description": "A GLSL expression returning the specular component of this material. The specular component is a float defining the intensity of incoming light reflecting in a single direction."
},
"normal" : {
"type": "string",
"description": "A GLSL expression returning the normal component of this material. The normal component is a vec3 defining the surface's normal in tangent coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal."
},
"emission" : {
"type": "string",
"default" : "vec3(0.0)",
"description": "A GLSL expression returning the emission component of this material. The emission component is a vec3 defining light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light."
},
"alpha" : {
"type": "string",
"default" : "1.0",
"description": "A GLSL expression returning the alpha component of this material. The alpha component is a float defining the opacity of this material. 0.0 is completely transparent; 1.0 is completely opaque."
}
}
},
"source": {
"type": "string",
"description": "GLSL source for the agi_getMaterial function with a full function definition. The components or source property is required, but not both.",
"pattern" : "agi_getMaterial"
}
}
}
2 changes: 1 addition & 1 deletion Examples/Sandbox/CodeSnippets/Circle.js
Expand Up @@ -31,7 +31,7 @@
ellipsoid, ellipsoid.cartographicToCartesian(
Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)), 300000.0));
// Any polygon-compatible material can be used
polygon.material = new Cesium.TieDyeMaterial(undefined);
polygon.material = Cesium.Material.fromId(scene.getContext(), 'TieDye');

primitives.add(polygon);
};
Expand Down

0 comments on commit 6c79e14

Please sign in to comment.