I updated minko as3 code to run on standard profile instead of baseline and i have a mesh with animations that i know for a fact, has 185 vertices constants, maximum allowed amount is 250 on standard, but i keep getting [trace] Error: Error #3659: AGAL validation failed: Constant register index out of bounds for source operand 1 at token 1 of vertex program.
i have zero knowledge about how agal works, but i do understand minko. Could anyone please point me in the right direction what to change? I have already adjusted minko Profile.as class and locations where its used, thats how i was able to zero in on exact amount of vertice constants in registry (185)
Hardware animations require more computations and more registers.
It looks like the standard has less registers. But the Minko AS3 shader doesn't know that. The limitations taken into account are enforced here:
https://github.com/aerys/minko-as3/blob/master/src/aerys/minko/render/shader/compiler/register/RegisterLimit.as
They probably fit with the baseline profile. I'm not sure if changing them will actually help you, because the problem might just be that the AGAL standard profile simply doesn't have enough constant registers...
If you're using
SkinningMethod.HARDWARE_MATRIX, you should consider usingSkinningMethod.HARDWARE_DUAL_QUATERNIONinstead.You could also set the
skinningMaxInfluencesproperty of your mesh to something lower. It should definitely try to use a more memory savy shader code (see https://github.com/aerys/minko-as3/blob/master/src/aerys/minko/render/shader/part/animation/SkinningShaderPart.as for the implementation details).