Added COLLADA and glTF formats for vulkanscene
This commit is contained in:
parent
8f33b69843
commit
06c9126a02
8 changed files with 5410 additions and 2 deletions
|
|
@ -14,9 +14,9 @@ If you use them in your (public) work, please drop me a line so I can check it o
|
||||||
|
|
||||||
## Formats
|
## 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.
|
If you need the models in a different format (that's common) please drop me a line.
|
||||||
|
|
||||||
|
|
|
||||||
BIN
models/gltf/vulkanscene/vulkanscene.bin
Normal file
BIN
models/gltf/vulkanscene/vulkanscene.bin
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 MiB |
3501
models/gltf/vulkanscene/vulkanscene.gltf
Normal file
3501
models/gltf/vulkanscene/vulkanscene.gltf
Normal file
File diff suppressed because it is too large
Load diff
21
models/gltf/vulkanscene/vulkanscene0FS.glsl
Normal file
21
models/gltf/vulkanscene/vulkanscene0FS.glsl
Normal 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;
|
||||||
|
}
|
||||||
12
models/gltf/vulkanscene/vulkanscene0VS.glsl
Normal file
12
models/gltf/vulkanscene/vulkanscene0VS.glsl
Normal 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;
|
||||||
|
}
|
||||||
21
models/gltf/vulkanscene/vulkanscene1FS.glsl
Normal file
21
models/gltf/vulkanscene/vulkanscene1FS.glsl
Normal 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;
|
||||||
|
}
|
||||||
12
models/gltf/vulkanscene/vulkanscene1VS.glsl
Normal file
12
models/gltf/vulkanscene/vulkanscene1VS.glsl
Normal 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
1841
models/vulkanscene.dae
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue