1
在我的項目中,我們將矩陣的一部分推送到骨架動畫的常量寄存器,並通過着色器中的矩陣索引訪問它們,這些常量寄存器也通過常量寄存器傳遞。關於AGAL中骨架動畫的着色器
樣品着色器與glsles:
uniform highp vec4 mPalette[60]; //a part of the matrix for skeleton.
attribute highp vec4 _glesVertex; //the input positions.
attribute vec4 mBlendindices; //the matrix index.
void main()
{
gl_Position = mPalette[mBlendindices.x];
}
如果我分配值 「mPalette」 使用常數寄存器:VC0 - vc59,分配值 「mBlendindices」 使用常數寄存器:VC60,分配_glesVertex到使用頂點屬性寄存器:va0。
如何將此着色器轉換爲AGAL?