mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-01 21:40:43 +00:00
[vulkan] Use identity for vertices with no bone weights
Since the identity matrix is mixed in with the other bones, interesting things will happen if the bone weights don't add up to 1 and are not all zero.
This commit is contained in:
parent
8dd0410968
commit
084ac76f55
1 changed files with 1 additions and 0 deletions
|
@ -46,6 +46,7 @@ main (void)
|
|||
m += bones[vbones.y] * vweights.y;
|
||||
m += bones[vbones.z] * vweights.z;
|
||||
m += bones[vbones.w] * vweights.w;
|
||||
m += mat3x4(1,0,0,0,0,1,0,0,0,0,1,0) * (1 - dot(vweights, vec4(1,1,1,1)));
|
||||
vec4 pos = Model * vec4 (vec4(vposition, 1) * m, 1);
|
||||
if (IQMShadow) {
|
||||
gl_Position = shadowView[MatrixBase + gl_ViewIndex] * pos;
|
||||
|
|
Loading…
Reference in a new issue