Skinning issue on iPhone5S / Series6

This topic contains 2 replies, has 2 voices, and was last updated by  Joe Davis 4 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31494

    VB33
    Member

    Hello,

    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(position.xyz, 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 ?

    #38020

    VB33
    Member

    Hello,

    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.

    Thanks

    #38021

    Joe Davis
    Member

    Hi,

    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 🙂

    Joe

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.