I am trying to understand the molehill and would like many tops by two matrix, say:
output = theVertex * scalematrix * rotation matrix I would look something like guessing my top peak:
"m44 vt0, Va0, vc0 \ N "+" mul op, vt0, vc1 \ n "; and I'll set the matrix with
context3d.setProgramConstantsFromMatrix (Context3DProgramType.VERTEX, 0, scaleMatrix); Reference 3d.setProgramConstantsFromMatrix (Reference 3DProgramType.VERTEX, 1, Rotation Matrix); But its not working what I am doing wrong?
I know that I can do the matrix several times before putting on the shader, but I am trying to understand the AGL.
Cheers
A m44 is matrix 4x4 floats , It takes 4 registers as each register 128bits (4 floats), then you have to load your rotation matrix in the vc4 register: "m44 Vt0, va0, vc0 \ n "+" mul op, vt0, vc4 \ n ";
reference 3d.setProgramConstantsFromMatrix (Context3DProgramType.VERTEX, 0, scaleMatrix); Reference 3d.setProgramConstantsFromMatrix (Reference 3DProgramType.VERTEX, 4, Rotation Matrix);
Comments
Post a Comment