Added COLLADA and glTF formats for vulkanscene

This commit is contained in:
saschawillems 2015-08-16 11:58:50 +02:00
parent 8f33b69843
commit 06c9126a02
8 changed files with 5410 additions and 2 deletions

View file

@ -14,9 +14,9 @@ If you use them in your (public) work, please drop me a line so I can check it o
## Formats
Models are always provided as .X (DirectX file format, binary version), as this format supports everything necessary.
Models are provided in different formats, but usually at least as .X (DirectX file format, binary version), as this format supports everything necessary to correctly display the models.
If possible (max. 64k triangles) a .3DS file is also provided, if the model has more than 64k triangles a .OBJ (Wavefront) version including the material libary (.mtl) is also provided.
Some of the models are also available as [glTF](https://www.khronos.org/gltf) and [COLLADA](https://www.khronos.org/collada/) formats, both made by the Khronos group.
If you need the models in a different format (that's common) please drop me a line.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
precision highp float;
varying vec3 v_normal;
uniform vec4 u_diffuse;
uniform vec4 u_emission;
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 emission;
vec4 specular;
diffuse = u_diffuse;
emission = u_emission;
specular = u_specular;
diffuse.xyz *= max(dot(normal,vec3(0.,0.,1.)), 0.);
color.xyz += diffuse.xyz;
color.xyz += emission.xyz;
color = vec4(color.rgb * diffuse.a, diffuse.a);
gl_FragColor = color;
}

View file

@ -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;
}

View file

@ -0,0 +1,21 @@
precision highp float;
varying vec3 v_normal;
uniform vec4 u_diffuse;
uniform vec4 u_emission;
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 emission;
vec4 specular;
diffuse = u_diffuse;
emission = u_emission;
specular = u_specular;
diffuse.xyz *= max(dot(normal,vec3(0.,0.,1.)), 0.);
color.xyz += diffuse.xyz;
color.xyz += emission.xyz;
color = vec4(color.rgb * diffuse.a, diffuse.a);
gl_FragColor = color;
}

View file

@ -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;
}

1841
models/vulkanscene.dae Normal file

File diff suppressed because one or more lines are too long