#ifdef VERTEX_SHADER

uniform mat4 u_mvpMatrix;
uniform mat4 u_mBonePalette[48];
attribute vec4 a_vertex;
attribute vec4 a_infIdx;
void main()
	{
	// --- Skinning
	ivec4 iCurIndex = ivec4(a_infIdx);
	vec4 vTP = u_mBonePalette[iCurIndex.x] * a_vertex;
	gl_Position = u_mvpMatrix * vTP;
	}

#endif

#ifdef FRAGMENT_SHADER
void main()
	{
	gl_FragColor.r = 1.0-gl_FragCoord.z;
	}
#endif
