2012-01-01 14:58:12 +00:00
|
|
|
uniform mat4 mvp_mat;
|
2012-01-02 02:18:34 +00:00
|
|
|
uniform mat3 norm_mat;
|
2012-01-02 04:41:12 +00:00
|
|
|
uniform vec2 skin_size;
|
2012-01-04 05:35:34 +00:00
|
|
|
uniform float blend;
|
2012-01-01 14:58:12 +00:00
|
|
|
|
2012-01-04 05:35:34 +00:00
|
|
|
attribute vec4 vcolora, vcolorb;
|
|
|
|
attribute vec2 vsta, vstb;
|
|
|
|
attribute vec3 vnormala, vnormalb;
|
|
|
|
attribute vec3 vertexa, vertexb;
|
2012-01-01 14:58:12 +00:00
|
|
|
|
|
|
|
varying vec3 normal;
|
|
|
|
varying vec2 st;
|
|
|
|
varying vec4 color;
|
|
|
|
|
|
|
|
void
|
|
|
|
main (void)
|
|
|
|
{
|
2012-01-04 05:35:34 +00:00
|
|
|
vec3 vertex;
|
|
|
|
vec3 vnormal;
|
|
|
|
|
|
|
|
vertex = mix (vertexa, vertexb, blend);
|
|
|
|
vnormal = mix (vnormala, vnormalb, blend);
|
2012-01-01 14:58:12 +00:00
|
|
|
gl_Position = mvp_mat * vec4 (vertex, 1.0);
|
2012-01-04 05:35:34 +00:00
|
|
|
st = mix (vsta, vstb, blend) / skin_size;
|
2012-01-04 00:42:00 +00:00
|
|
|
normal = norm_mat * vnormal;
|
2012-01-04 05:35:34 +00:00
|
|
|
color = mix (vcolora, vcolorb, blend);
|
2012-01-01 14:58:12 +00:00
|
|
|
}
|