mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
99381b8b8c
Lerping isn't actually done yet (need to get both poses and blend), but this still renders correctly with blend forced to 0.0.
27 lines
587 B
GLSL
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);
|
|
}
|