In the ARB_vertex_program extension I’m reading:

MVP = M0 * P,

where M0 is modelview matrix zero, and P is the projection matrix.

That’s strange for me, because I thought a vertex is transformed like:
v’ = PMv

but with state.matrix.mvp:
v’ = MPv

Can somebody clarify this to me?

Thanks a lot!

If I’m not mistaking, you should multiply v on the other side, thus:

v’ = vMP


This certainly sounds like a bug in the spec. Implementations will almost certainly “do the right thing”, since drivers have been working with MVP matrices since well before vertex programs arrived on the scene. I will confirm that this is wrong and fix the spec. (I was the editor of the spec, so you can blame me.)

ARB_fragment_program appears similarly busted – I will pass this information along to the editor of this spec.

One other note: The example of matrix transposition in issue (50) was wrong in the spec. NV_vertex_program was similarly busted. This was fixed in version 36 of the spec. (Current version is 37.) Last time I checked, the registry hadn’t been updated beyond version 34.

This was pretty embarassing when you consider the text of the issue:

(50) Discussing matrices is confusing because of row-major versus column-major issues. Can you give an example of how a matrix is bound?

Now it’s ok for me. In the beginning reading this in ARB_vertex_program (Version Last Modified Date: 7/19/2002 Revision: 34)
it was kind of confusing. Normally by convention a matrix is multiplied with a vector in the old traditional way: v’ = Mv
and not like v’ = v
So…the extension is working of course, the only ‘bug’ is this typo mvp.

Thanks for clearing that up. And assuming issue #50 was meant to clarify matrices, it was pretty annoying to get confused instead.

ATI’s pdf with extensions has revision 23 of ARB_fragment_program. And NVIDIA has revision 37 of ARB_vertex_program ( and 22 of ARB_fp ). The registry is never up to date and personally I prefer the pdf versions. I prefer NVIDIAs pdf as it is sorted and contains a date of when it was last modified.

Thanks to A027298, there will now be a version 38 of ARB_vertex_program and a version 24 of ARB_fragment_program. Hopefully we can get them into the registry sometime soon.