I'm probably going to screw this up but.... In all the graphics libraries I've seen various matrices are often called something along the lines of
viewProjection
modelViewProjection
worldViewProjection
mvp
wvp
etc.
But, that seems unintuitive given that GLSL, HLSL, and most math libraries seem to multiply in the opposite direction.
In other words
viewProjection = projection * view; // correct but unintuitive
vs
viewProjection = view * projection; // incorrect but naming matches order
It gets worse if you add in transpose or inverse since now the order of operations vs the order of parts of the name of the matrix make zero sense whatsoever. a worldViewProjectionInverseTranspose
would be
transpose(inverse(projection * view * world))
Well you can read it backward but as far as order of operations and position in the expression its
5 ( 4 ( 1 * 2 * 3 ) )
Is there any objective reason for the names to be backward from the operations that construct them or is it just some naming convention that stuck from some example lost in obscurity?
I'm asking this question because being that it's unintuitive I find it's always hard to remember the order. If worldViewProjection
equaled world * view * projection
it would be easy since the name matches the order. I'm hoping there's some other objective reason that might help remember vs just remembering always multiply backward from the order of the parts of the commonly used names.
a = b + c + d
no one would describe that as addingd
first $\endgroup$worldToScreen = worldToView * viewToScreen
, orscreenPosition = worldToScreen * worldPosition
... $\endgroup$