diff --git a/2.0/PrimitiveModeNormalsTest/README.md b/2.0/PrimitiveModeNormalsTest/README.md new file mode 100644 index 00000000..88af057e --- /dev/null +++ b/2.0/PrimitiveModeNormalsTest/README.md @@ -0,0 +1,19 @@ +# Primitive Mode Normals Test + +## Screenshot + +![screenshot](screenshot/screenshot.png) + +## Description + +This asset tests rendering of point, line, and triangle primitive modes with and without vertex normals. + +- The first two columns, points and lines without normals, should be rendered as solid colors without lighting. + +- The third column, triangles without normals, should be rendered with flat shading and full PBR material model. + +- The remaining columns, all three modes with normals, should be rendered with smooth shading and full PBR material model. + +## License Information + +Public domain ([CC0](https://creativecommons.org/publicdomain/zero/1.0/)) diff --git a/2.0/PrimitiveModeNormalsTest/glTF/Colors.bin b/2.0/PrimitiveModeNormalsTest/glTF/Colors.bin new file mode 100644 index 00000000..140565bb Binary files /dev/null and b/2.0/PrimitiveModeNormalsTest/glTF/Colors.bin differ diff --git a/2.0/PrimitiveModeNormalsTest/glTF/Labels.png b/2.0/PrimitiveModeNormalsTest/glTF/Labels.png new file mode 100644 index 00000000..1f95409f Binary files /dev/null and b/2.0/PrimitiveModeNormalsTest/glTF/Labels.png differ diff --git a/2.0/PrimitiveModeNormalsTest/glTF/Lines.bin b/2.0/PrimitiveModeNormalsTest/glTF/Lines.bin new file mode 100644 index 00000000..f2d5d9b7 Binary files /dev/null and b/2.0/PrimitiveModeNormalsTest/glTF/Lines.bin differ diff --git a/2.0/PrimitiveModeNormalsTest/glTF/Plane.bin b/2.0/PrimitiveModeNormalsTest/glTF/Plane.bin new file mode 100644 index 00000000..17e382f1 Binary files /dev/null and b/2.0/PrimitiveModeNormalsTest/glTF/Plane.bin differ diff --git a/2.0/PrimitiveModeNormalsTest/glTF/Points.bin b/2.0/PrimitiveModeNormalsTest/glTF/Points.bin new file mode 100644 index 00000000..b0a54249 Binary files /dev/null and b/2.0/PrimitiveModeNormalsTest/glTF/Points.bin differ diff --git a/2.0/PrimitiveModeNormalsTest/glTF/PrimitiveModeNormalsTest.gltf b/2.0/PrimitiveModeNormalsTest/glTF/PrimitiveModeNormalsTest.gltf new file mode 100644 index 00000000..2112512d --- /dev/null +++ b/2.0/PrimitiveModeNormalsTest/glTF/PrimitiveModeNormalsTest.gltf @@ -0,0 +1,793 @@ +{ + "asset": { + "version": "2.0" + }, + "materials": [ + { + "pbrMetallicRoughness": { + "baseColorFactor": [ + 0.5, + 0.5, + 0.5, + 1 + ], + "metallicFactor": 1, + "roughnessFactor": 0 + }, + "emissiveFactor": [ + 0, + 0.1, + 0.1 + ] + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 1 + }, + "emissiveFactor": [ + 1, + 1, + 1 + ], + "emissiveTexture": { + "index": 0 + }, + "alphaMode": "MASK", + "doubleSided": true + } + ], + "buffers": [ + { + "uri": "Points.bin", + "byteLength": 786432 + }, + { + "uri": "Lines.bin", + "byteLength": 786432 + }, + { + "uri": "Triangles.bin", + "byteLength": 4380 + }, + { + "uri": "Colors.bin", + "byteLength": 262144 + }, + { + "uri": "Plane.bin", + "byteLength": 92 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 786432 + }, + { + "buffer": 1, + "byteLength": 786432 + }, + { + "buffer": 2, + "byteLength": 2460, + "byteOffset": 0, + "byteStride": 12 + }, + { + "buffer": 2, + "byteLength": 1920, + "byteOffset": 2460 + }, + { + "buffer": 3, + "byteLength": 262144, + "byteStride": 4 + }, + { + "buffer": 4, + "byteLength": 48 + }, + { + "buffer": 4, + "byteOffset": 48, + "byteLength": 32 + }, + { + "buffer": 4, + "byteOffset": 80, + "byteLength": 12 + } + ], + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "type": "VEC3", + "count": 65536, + "min": [ + -1, + -1, + -1 + ], + "max": [ + 1, + 1, + 1 + ] + }, + { + "bufferView": 1, + "componentType": 5126, + "type": "VEC3", + "count": 65536, + "min": [ + -1, + -1, + -0.99999237 + ], + "max": [ + 1, + 0.99993896, + 0.99999237 + ] + }, + { + "bufferView": 2, + "componentType": 5126, + "count": 205, + "max": [ + 1, + 1, + 0.99999994 + ], + "min": [ + -0.99999994, + -1, + -0.99999994 + ], + "type": "VEC3" + }, + { + "bufferView": 2, + "componentType": 5126, + "count": 205, + "type": "VEC3" + }, + { + "bufferView": 3, + "componentType": 5123, + "count": 960, + "type": "SCALAR" + }, + { + "bufferView": 4, + "componentType": 5121, + "count": 205, + "type": "VEC4", + "normalized": true + }, + { + "bufferView": 4, + "componentType": 5121, + "count": 65536, + "type": "VEC4", + "normalized": true + }, + { + "bufferView": 5, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "min": [ + 0, + 0, + 0 + ], + "max": [ + 1, + 1, + 0 + ] + }, + { + "bufferView": 6, + "componentType": 5126, + "count": 4, + "type": "VEC2" + }, + { + "bufferView": 7, + "componentType": 5123, + "count": 6, + "type": "SCALAR" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "mode": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 1 + }, + "mode": 3 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 2 + }, + "indices": 4, + "mode": 4 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 0, + "COLOR_0": 6 + }, + "mode": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "COLOR_0": 6 + }, + "mode": 3 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 2, + "COLOR_0": 5 + }, + "indices": 4, + "mode": 4 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "mode": 0, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 1 + }, + "mode": 3, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 2 + }, + "indices": 4, + "mode": 4, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 0, + "COLOR_0": 6 + }, + "mode": 0, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "COLOR_0": 6 + }, + "mode": 3, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 2, + "COLOR_0": 5 + }, + "indices": 4, + "mode": 4, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 0, + "NORMAL": 0 + }, + "mode": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 1 + }, + "mode": 3 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 2, + "NORMAL": 3 + }, + "indices": 4, + "mode": 4 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 0, + "COLOR_0": 6, + "NORMAL": 0 + }, + "mode": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "COLOR_0": 6, + "NORMAL": 1 + }, + "mode": 3 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 2, + "COLOR_0": 5, + "NORMAL": 3 + }, + "indices": 4, + "mode": 4 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 0, + "NORMAL": 0 + }, + "mode": 0, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 1 + }, + "mode": 3, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 2, + "NORMAL": 3 + }, + "indices": 4, + "mode": 4, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 0, + "COLOR_0": 6, + "NORMAL": 0 + }, + "mode": 0, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "COLOR_0": 6, + "NORMAL": 1 + }, + "mode": 3, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 2, + "COLOR_0": 5, + "NORMAL": 3 + }, + "indices": 4, + "mode": 4, + "material": 0 + } + ] + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 7, + "TEXCOORD_0": 8 + }, + "indices": 9, + "material": 1 + } + ] + } + ], + "nodes": [ + { + "mesh": 0, + "translation": [ + -2.5, + 10, + 0 + ] + }, + { + "mesh": 1, + "translation": [ + 0, + 10, + 0 + ] + }, + { + "mesh": 2, + "translation": [ + 2.5, + 10, + 0 + ] + }, + { + "mesh": 3, + "translation": [ + -2.5, + 7, + 0 + ] + }, + { + "mesh": 4, + "translation": [ + 0, + 7, + 0 + ] + }, + { + "mesh": 5, + "translation": [ + 2.5, + 7, + 0 + ] + }, + { + "mesh": 6, + "translation": [ + -2.5, + 4, + 0 + ] + }, + { + "mesh": 7, + "translation": [ + 0, + 4, + 0 + ] + }, + { + "mesh": 8, + "translation": [ + 2.5, + 4, + 0 + ] + }, + { + "mesh": 9, + "translation": [ + -2.5, + 1, + 0 + ] + }, + { + "mesh": 10, + "translation": [ + 0, + 1, + 0 + ] + }, + { + "mesh": 11, + "translation": [ + 2.5, + 1, + 0 + ] + }, + { + "mesh": 12, + "translation": [ + -2.5, + 10, + 0 + ] + }, + { + "mesh": 13, + "translation": [ + 0, + 10, + 0 + ] + }, + { + "mesh": 14, + "translation": [ + 2.5, + 10, + 0 + ] + }, + { + "mesh": 15, + "translation": [ + -2.5, + 7, + 0 + ] + }, + { + "mesh": 16, + "translation": [ + 0, + 7, + 0 + ] + }, + { + "mesh": 17, + "translation": [ + 2.5, + 7, + 0 + ] + }, + { + "mesh": 18, + "translation": [ + -2.5, + 4, + 0 + ] + }, + { + "mesh": 19, + "translation": [ + 0, + 4, + 0 + ] + }, + { + "mesh": 20, + "translation": [ + 2.5, + 4, + 0 + ] + }, + { + "mesh": 21, + "translation": [ + -2.5, + 1, + 0 + ] + }, + { + "mesh": 22, + "translation": [ + 0, + 1, + 0 + ] + }, + { + "mesh": 23, + "translation": [ + 2.5, + 1, + 0 + ] + }, + { + "children": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "translation": [ + -4, + 0, + 0 + ] + }, + { + "children": [ + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 + ], + "translation": [ + 4, + 0, + 0 + ] + }, + { + "mesh": 24, + "scale": [ + 20, + 14, + 1 + ], + "translation": [ + -12.5, + 0, + -2 + ] + }, + { + "children": [ + 24, + 25, + 26 + ], + "translation": [ + 2.5, + -7, + 0.5 + ] + } + ], + "scenes": [ + { + "nodes": [ + 27 + ] + } + ], + "scene": 0, + "textures": [ + { + "source": 0, + "sampler": 0 + } + ], + "images": [ + { + "uri": "Labels.png" + } + ], + "samplers": [ + { + "wrapS": 33071, + "wrapT": 33071 + } + ] +} \ No newline at end of file diff --git a/2.0/PrimitiveModeNormalsTest/glTF/Triangles.bin b/2.0/PrimitiveModeNormalsTest/glTF/Triangles.bin new file mode 100644 index 00000000..56b249b9 Binary files /dev/null and b/2.0/PrimitiveModeNormalsTest/glTF/Triangles.bin differ diff --git a/2.0/PrimitiveModeNormalsTest/screenshot/screenshot.png b/2.0/PrimitiveModeNormalsTest/screenshot/screenshot.png new file mode 100644 index 00000000..b2ab7f53 Binary files /dev/null and b/2.0/PrimitiveModeNormalsTest/screenshot/screenshot.png differ