Imagination PowerVR SDK Blog

Skinning issue on iPhone5S / Series6



We have a game using hardware skinning with a vertex shader that globally looks like this :

uniform highp mat4 BoneMatrices[64];

uniform highp vec4 WeightMask;

attribute highp vec4 SkinWeights;

attribute mediump vec4 SkinIndices;

void main()


highp vec4 weights = SkinWeights * WeightMask;

highp vec3 netPosition = VEC3(0.0, 0.0, 0.0);

mediump vec4 indices = SkinIndices;

for (mediump int i = 0; i < 4; i++)


highp int index = int(indices);

netPosition += weights * (BoneMatrices[index] * vec4(, 1)).xyz;


highp vec4 P = VEC4(netPosition, 1.0);

gl_Position = wvp*P;


It works well on all IOS devices with Series5 GPUs,

but on iPhone5S ONLY (which uses Series6) the mesh gets completely deformed, as if the weights were corrupted

Any idea on why this may happen ? are we using too much bones ?



Seems like the precision issue was more linked to the “world view projection” matrix than to the skinning itself (the deformations were actually linked to having for example a (x,y,z) position with very high values used on the model …)

We solved the problem by reverting to software skining.




Sorry for not responding sooner. We’re close to our 3.2 SDK release, so have gone a little quiet on the forum…

Glad to hear you’ve resolve the issue :slight_smile: