我做"顶点蒙皮"没问题。用于三维动画。使用模拟器(和genymotion)时,所有内容都正常。但是,在真实设备(例如三星和联想)上运行时,看起来凌乱。
1drv.ms/1BzZ2we
int location = ...;
int arrayCount = ...;
float[] skinTransform = ...;
GL.UniformMatrix4(location, arrayCount, false, skinTransform);
uniform mat4 World;
uniform mat4 View;
uniform mat4 Projection;
uniform mat4 Bones[20];
attribute vec4 Position;
attribute vec4 BoneIndices;
attribute vec4 BoneWeights;
attribute vec2 UV;
varying vec4 v_Position;
varying vec2 v_UV;
void main()
{
mat4 skinTransform;
int boneIndex = int(BoneIndices.x);
skinTransform += Bones[boneIndex] * BoneWeights.x;
boneIndex = int(BoneIndices.y);
skinTransform += Bones[boneIndex] * BoneWeights.y;
boneIndex = int(BoneIndices.z);
skinTransform += Bones[boneIndex] * BoneWeights.z;
boneIndex = int(BoneIndices.w);
skinTransform += Bones[boneIndex] * BoneWeights.w;
vec4 skinPos = Position * skinTransform;
vec4 worldPosition = skinPos * World;
vec4 viewPosition = worldPosition * View;
v_Position = viewPosition * Projection;
v_UV = UV;
gl_Position = v_Position;
}
http://1drv.ms/1BzYV3Q 触摸屏幕至开/关动画。
有没有解决这个问题的方案?
致以最诚挚的问候,谢谢。