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
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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue