accommodate inspector change
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / model.vs
1 layout (location=0) in vec3 a_co;
2 layout (location=1) in vec3 a_norm;
3 layout (location=2) in vec2 a_uv;
4 layout (location=3) in vec4 a_colour;
5 layout (location=4) in vec4 a_weights;
6 layout (location=5) in ivec4 a_groups;
7
8 #include "motion_vectors_vs.glsl"
9
10 uniform mat4x3 uMdl;
11 uniform mat4 uPv;
12 uniform mat4 uPvmPrev;
13
14 out vec4 aColour;
15 out vec2 aUv;
16 out vec3 aNorm;
17 out vec3 aCo;
18 out vec3 aWorldCo;
19
20 void main()
21 {
22 vec3 world_pos0 = uMdl * vec4( a_co, 1.0 );
23 vec4 vproj0 = uPv * vec4( world_pos0, 1.0 );
24 vec4 vproj1 = uPvmPrev * vec4( a_co, 1.0 );
25
26 vs_motion_out( vproj0, vproj1 );
27
28 gl_Position = vproj0;
29 aWorldCo = world_pos0;
30 aColour = a_colour;
31 aUv = a_uv;
32 aNorm = normalize( mat3(uMdl) * a_norm );
33 aCo = a_co;
34 }