quakeforge/libs/video/renderer/glsl/quakemdl.vert
Bill Currie 99381b8b8c Rework the alias vertex shader and rendering code for lerping.
Lerping isn't actually done yet (need to get both poses and blend), but
this still renders correctly with blend forced to 0.0.
2012-01-04 14:35:34 +09:00

27 lines
587 B
GLSL

uniform mat4 mvp_mat;
uniform mat3 norm_mat;
uniform vec2 skin_size;
uniform float blend;
attribute vec4 vcolora, vcolorb;
attribute vec2 vsta, vstb;
attribute vec3 vnormala, vnormalb;
attribute vec3 vertexa, vertexb;
varying vec3 normal;
varying vec2 st;
varying vec4 color;
void
main (void)
{
vec3 vertex;
vec3 vnormal;
vertex = mix (vertexa, vertexb, blend);
vnormal = mix (vnormala, vnormalb, blend);
gl_Position = mvp_mat * vec4 (vertex, 1.0);
st = mix (vsta, vstb, blend) / skin_size;
normal = norm_mat * vnormal;
color = mix (vcolora, vcolorb, blend);
}