mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
Almost fix the animations.
There's still a problem with his finger tips and feet, but the rest of his limbs seem to be working well. Much thanks to Spike for encouraging me to do a dump of the matices that are actually sent to the card. It turns out that animated joints remain relative right up to the last moment.
This commit is contained in:
parent
4ba69b511b
commit
a938c7fb14
2 changed files with 10 additions and 3 deletions
|
@ -211,8 +211,8 @@ glsl_R_DrawIQM (void)
|
||||||
Mat4Mult (iqm_vp, ent->transform, mvp_mat);
|
Mat4Mult (iqm_vp, ent->transform, mvp_mat);
|
||||||
|
|
||||||
blend = R_IQMGetLerpedFrames (ent, iqm);
|
blend = R_IQMGetLerpedFrames (ent, iqm);
|
||||||
#if 0
|
|
||||||
frame = Hunk_TempAlloc (iqm->num_joints * sizeof (iqmframe_t));
|
frame = Hunk_TempAlloc (iqm->num_joints * sizeof (iqmframe_t));
|
||||||
|
#if 0
|
||||||
for (i = 0; i < iqm->num_joints; i++) {
|
for (i = 0; i < iqm->num_joints; i++) {
|
||||||
iqmframe_t *f1 = &iqm->frames[ent->pose1][i];
|
iqmframe_t *f1 = &iqm->frames[ent->pose1][i];
|
||||||
iqmframe_t *f2 = &iqm->frames[ent->pose2][i];
|
iqmframe_t *f2 = &iqm->frames[ent->pose2][i];
|
||||||
|
@ -222,7 +222,14 @@ glsl_R_DrawIQM (void)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
blend = blend;
|
blend = blend;
|
||||||
frame = iqm->frames[ent->pose1];
|
for (i = 0; i < iqm->num_joints; i++) {
|
||||||
|
iqmframe_t *frameset = iqm->frames[ent->pose1];
|
||||||
|
iqmjoint *j = &iqm->joints[i];
|
||||||
|
Mat4Copy ((float*)&frameset[i], (float*)&frame[i]);
|
||||||
|
if (j->parent >= 0)
|
||||||
|
Mat4Mult ((float*)&frame[j->parent],
|
||||||
|
(float*)&frame[i], (float*)&frame[i]);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < MAX_IQM_LIGHTS; i++) {
|
for (i = 0; i < MAX_IQM_LIGHTS; i++) {
|
||||||
|
|
|
@ -4,9 +4,9 @@ uniform mat4 bonemats[80];
|
||||||
attribute vec4 vcolor;
|
attribute vec4 vcolor;
|
||||||
attribute vec4 vweights;
|
attribute vec4 vweights;
|
||||||
attribute vec4 vbones;
|
attribute vec4 vbones;
|
||||||
attribute vec2 texcoord;
|
|
||||||
attribute vec4 vtangent;
|
attribute vec4 vtangent;
|
||||||
attribute vec3 vnormal;
|
attribute vec3 vnormal;
|
||||||
|
attribute vec2 texcoord;
|
||||||
attribute vec3 vposition;
|
attribute vec3 vposition;
|
||||||
|
|
||||||
varying vec3 position;
|
varying vec3 position;
|
||||||
|
|
Loading…
Reference in a new issue