FTEQW
Documentation of the FTE engine source tree.
skeletal.h
Go to the documentation of this file.
1#ifdef SKELETAL
3 {
4 mat3x4 wmat;
5 wmat = m_bones[int(v_bone.x)] * v_weight.x;
6 wmat += m_bones[int(v_bone.y)] * v_weight.y;
7 wmat += m_bones[int(v_bone.z)] * v_weight.z;
8 wmat += m_bones[int(v_bone.w)] * v_weight.w;
9 return m_modelviewprojection * vec4(vec4(v_position.xyz, 1.0) * wmat, 1.0);
10 }
11 vec4 skeletaltransform_nst(out vec3 n, out vec3 t, out vec3 b)
12 {
13 mat3x4 wmat;
14 wmat = m_bones[int(v_bone.x)] * v_weight.x;
15 wmat += m_bones[int(v_bone.y)] * v_weight.y;
16 wmat += m_bones[int(v_bone.z)] * v_weight.z;
17 wmat += m_bones[int(v_bone.w)] * v_weight.w;
18 n = vec4(v_normal.xyz, 0.0) * wmat;
19 t = vec4(v_svector.xyz, 0.0) * wmat;
20 b = vec4(v_tvector.xyz, 0.0) * wmat;
21 return m_modelviewprojection * vec4(vec4(v_position.xyz, 1.0) * wmat, 1.0);
22 }
23 vec4 skeletaltransform_wnst(out vec3 w, out vec3 n, out vec3 t, out vec3 b)
24 {
25 mat3x4 wmat;
26 wmat = m_bones[int(v_bone.x)] * v_weight.x;
27 wmat += m_bones[int(v_bone.y)] * v_weight.y;
28 wmat += m_bones[int(v_bone.z)] * v_weight.z;
29 wmat += m_bones[int(v_bone.w)] * v_weight.w;
30 n = vec4(v_normal.xyz, 0.0) * wmat;
31 t = vec4(v_svector.xyz, 0.0) * wmat;
32 b = vec4(v_tvector.xyz, 0.0) * wmat;
33 w = vec4(v_position.xyz, 1.0) * wmat;
34 return m_modelviewprojection * vec4(w, 1.0);
35 }
37 {
38 mat3x4 wmat;
39 wmat = m_bones[int(v_bone.x)] * v_weight.x;
40 wmat += m_bones[int(v_bone.y)] * v_weight.y;
41 wmat += m_bones[int(v_bone.z)] * v_weight.z;
42 wmat += m_bones[int(v_bone.w)] * v_weight.w;
43 n = vec4(v_normal.xyz, 0.0) * wmat;
44 return m_modelviewprojection * vec4(vec4(v_position.xyz, 1.0) * wmat, 1.0);
45 }
46#else
47 #define skeletaltransform ftetransform
48 vec4 skeletaltransform_wnst(out vec3 w, out vec3 n, out vec3 t, out vec3 b)
49 {
50 n = v_normal;
51 t = v_svector;
52 b = v_tvector;
53 w = v_position.xyz;
54 return ftetransform();
55 }
56 vec4 skeletaltransform_nst(out vec3 n, out vec3 t, out vec3 b)
57 {
58 n = v_normal;
59 t = v_svector;
60 b = v_tvector;
61 return ftetransform();
62 }
63 vec4 skeletaltransform_n(out vec3 n)
64 {
65 n = v_normal;
66 return ftetransform();
67 }
68#endif
vec4 ftetransform()
Definition: defs.h:95
GLfloat t
Definition: gl_vidcommon.c:184
static CONST PIXELFORMATDESCRIPTOR *static int
Definition: gl_vidnt.c:222
GLfloat GLfloat GLfloat GLfloat w
Definition: glquake.h:158
int b
Definition: pr_lua.c:242
vec4 skeletaltransform_n(out vec3 n)
Definition: skeletal.h:36
vec4 skeletaltransform_wnst(out vec3 w, out vec3 n, out vec3 t, out vec3 b)
Definition: skeletal.h:23
vec4 skeletaltransform()
Definition: skeletal.h:2
vec4 skeletaltransform_nst(out vec3 n, out vec3 t, out vec3 b)
Definition: skeletal.h:11
static AL_API ALsizei n
Definition: snd_al.c:161
static SpeexBits spx_int16_t * out
Definition: snd_dma.c:492