diff options
Diffstat (limited to 'libs/assimp/test/models/glTF/TwoBoxes')
-rw-r--r-- | libs/assimp/test/models/glTF/TwoBoxes/Box.bin | bin | 0 -> 648 bytes | |||
-rw-r--r-- | libs/assimp/test/models/glTF/TwoBoxes/Box0FS.glsl | 17 | ||||
-rw-r--r-- | libs/assimp/test/models/glTF/TwoBoxes/Box0VS.glsl | 12 | ||||
-rw-r--r-- | libs/assimp/test/models/glTF/TwoBoxes/TwoBoxes.gltf | 276 |
4 files changed, 305 insertions, 0 deletions
diff --git a/libs/assimp/test/models/glTF/TwoBoxes/Box.bin b/libs/assimp/test/models/glTF/TwoBoxes/Box.bin Binary files differnew file mode 100644 index 0000000..29a29e1 --- /dev/null +++ b/libs/assimp/test/models/glTF/TwoBoxes/Box.bin diff --git a/libs/assimp/test/models/glTF/TwoBoxes/Box0FS.glsl b/libs/assimp/test/models/glTF/TwoBoxes/Box0FS.glsl new file mode 100644 index 0000000..6e928dc --- /dev/null +++ b/libs/assimp/test/models/glTF/TwoBoxes/Box0FS.glsl @@ -0,0 +1,17 @@ +precision highp float; +varying vec3 v_normal; +uniform vec4 u_diffuse; +uniform vec4 u_specular; +uniform float u_shininess; +void main(void) { +vec3 normal = normalize(v_normal); +vec4 color = vec4(0., 0., 0., 0.); +vec4 diffuse = vec4(0., 0., 0., 1.); +vec4 specular; +diffuse = u_diffuse; +specular = u_specular; +diffuse.xyz *= max(dot(normal,vec3(0.,0.,1.)), 0.); +color.xyz += diffuse.xyz; +color = vec4(color.rgb * diffuse.a, diffuse.a); +gl_FragColor = color; +} diff --git a/libs/assimp/test/models/glTF/TwoBoxes/Box0VS.glsl b/libs/assimp/test/models/glTF/TwoBoxes/Box0VS.glsl new file mode 100644 index 0000000..9e35922 --- /dev/null +++ b/libs/assimp/test/models/glTF/TwoBoxes/Box0VS.glsl @@ -0,0 +1,12 @@ +precision highp float; +attribute vec3 a_position; +attribute vec3 a_normal; +varying vec3 v_normal; +uniform mat3 u_normalMatrix; +uniform mat4 u_modelViewMatrix; +uniform mat4 u_projectionMatrix; +void main(void) { +vec4 pos = u_modelViewMatrix * vec4(a_position,1.0); +v_normal = u_normalMatrix * a_normal; +gl_Position = u_projectionMatrix * pos; +} diff --git a/libs/assimp/test/models/glTF/TwoBoxes/TwoBoxes.gltf b/libs/assimp/test/models/glTF/TwoBoxes/TwoBoxes.gltf new file mode 100644 index 0000000..a1953e5 --- /dev/null +++ b/libs/assimp/test/models/glTF/TwoBoxes/TwoBoxes.gltf @@ -0,0 +1,276 @@ +{ + "accessors": { + "accessor_21": { + "bufferView": "bufferView_29", + "byteOffset": 0, + "byteStride": 0, + "componentType": 5123, + "count": 36, + "type": "SCALAR" + }, + "accessor_23": { + "bufferView": "bufferView_30", + "byteOffset": 0, + "byteStride": 12, + "componentType": 5126, + "count": 24, + "max": [ + 0.5, + 0.5, + 0.5 + ], + "min": [ + -0.5, + -0.5, + -0.5 + ], + "type": "VEC3" + }, + "accessor_25": { + "bufferView": "bufferView_30", + "byteOffset": 288, + "byteStride": 12, + "componentType": 5126, + "count": 24, + "max": [ + 1, + 1, + 1 + ], + "min": [ + -1, + -1, + -1 + ], + "type": "VEC3" + } + }, + "animations": {}, + "asset": { + "generator": "collada2gltf@027f74366341d569dea42e9a68b7104cc3892054", + "premultipliedAlpha": true, + "profile": { + "api": "WebGL", + "version": "1.0.2" + }, + "version": "1.0" + }, + "bufferViews": { + "bufferView_29": { + "buffer": "Box", + "byteLength": 72, + "byteOffset": 0, + "target": 34963 + }, + "bufferView_30": { + "buffer": "Box", + "byteLength": 576, + "byteOffset": 72, + "target": 34962 + } + }, + "buffers": { + "Box": { + "byteLength": 648, + "type": "arraybuffer", + "uri": "Box.bin" + } + }, + "materials": { + "Effect-Red": { + "name": "Red", + "technique": "technique0", + "values": { + "diffuse": [ + 0.8, + 0, + 0, + 1 + ], + "shininess": 256, + "specular": [ + 0.2, + 0.2, + 0.2, + 1 + ] + } + } + }, + "meshes": { + "Geometry-mesh002": { + "name": "Mesh", + "primitives": [ + { + "attributes": { + "NORMAL": "accessor_25", + "POSITION": "accessor_23" + }, + "indices": "accessor_21", + "material": "Effect-Red", + "mode": 4 + } + ] + } + }, + "nodes": { + "BottomBox": { + "children": [], + "matrix": [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1 + ], + "meshes": [ + "Geometry-mesh002" + ], + "name": "BottomBox" + }, + "TopBox": { + "children": [], + "matrix": [ + 0.5, + 0, + 0, + 0, + 0, + 0.5, + 0, + 0, + 0, + 0, + 0.5, + 0, + 0, + 0, + 1, + 1 + ], + "meshes": [ + "Geometry-mesh002" + ], + "name": "TopBox" + }, + "node_1": { + "children": [ + "BottomBox", + "TopBox" + ], + "matrix": [ + 1, + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "name": "Y_UP_Transform" + } + }, + "programs": { + "program_0": { + "attributes": [ + "a_normal", + "a_position" + ], + "fragmentShader": "Box0FS", + "vertexShader": "Box0VS" + } + }, + "scene": "defaultScene", + "scenes": { + "defaultScene": { + "nodes": [ + "node_1" + ] + } + }, + "shaders": { + "Box0FS": { + "type": 35632, + "uri": "Box0FS.glsl" + }, + "Box0VS": { + "type": 35633, + "uri": "Box0VS.glsl" + } + }, + "skins": {}, + "techniques": { + "technique0": { + "attributes": { + "a_normal": "normal", + "a_position": "position" + }, + "parameters": { + "diffuse": { + "type": 35666 + }, + "modelViewMatrix": { + "semantic": "MODELVIEW", + "type": 35676 + }, + "normal": { + "semantic": "NORMAL", + "type": 35665 + }, + "normalMatrix": { + "semantic": "MODELVIEWINVERSETRANSPOSE", + "type": 35675 + }, + "position": { + "semantic": "POSITION", + "type": 35665 + }, + "projectionMatrix": { + "semantic": "PROJECTION", + "type": 35676 + }, + "shininess": { + "type": 5126 + }, + "specular": { + "type": 35666 + } + }, + "program": "program_0", + "states": { + "enable": [ + 2929, + 2884 + ] + }, + "uniforms": { + "u_diffuse": "diffuse", + "u_modelViewMatrix": "modelViewMatrix", + "u_normalMatrix": "normalMatrix", + "u_projectionMatrix": "projectionMatrix", + "u_shininess": "shininess", + "u_specular": "specular" + } + } + } +}
\ No newline at end of file |