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;
8 #include "motion_vectors_vs.glsl"
11 uniform mat4x3 uTransforms[32];
21 vec4 co_local = vec4( a_co, 1.0 );
22 vec3 co0 = uTransforms[ a_groups[0] ] * co_local;
23 vec3 co1 = uTransforms[ a_groups[1] ] * co_local;
24 vec3 co2 = uTransforms[ a_groups[2] ] * co_local;
25 vec3 n0 = mat3(uTransforms[ a_groups[0] ]) * a_norm;
26 vec3 n1 = mat3(uTransforms[ a_groups[1] ]) * a_norm;
27 vec3 n2 = mat3(uTransforms[ a_groups[2] ]) * a_norm;
29 vec3 world_pos = co0*a_weights[0] + co1*a_weights[1] + co2*a_weights[2];
30 vec3 world_normal = n0*a_weights[0] + n1*a_weights[1] + n2*a_weights[2];
32 gl_Position = uPv * vec4( world_pos, 1.0 );
39 // TODO: motion vectors
40 aMotionVec0 = vec3(1.0);
41 aMotionVec1 = vec3(1.0);