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