_Camera2World different between platforms?

Is it possible that platforms use different coordinate space directions?

I’m using a custom billboard shader that uses a global _Camera2World which is set using a script on the camera like this:

void Update () {
Shader.SetGlobalMatrix (“_Camera2World”, this.camera.cameraToWorldMatrix );
}

Everything looks fine on PC / Mac, but on iOS / Android it appears flipped (what i believe) all 3 axes.

This is the only shader that requires the matrix, and also the only one that is flipped, so that is how i arrived it being somewhere in this code.

Anything going on behind the scenes? Thanks!

Some platform are column-major, other are row major.

some platform have a matrix of the form :

ABCX
ABCY
ABCZ
0001

other

AAA0
BBB0
CCC0
XYZ1

So on GL plateform, just transpose the matrix before passing it.

Thanks Guillaume, that sheds some light. Does this mean that Unity’s matrices differ from ES 2.0 GL?
Because the phone is calcuating the _Camera2World in Unity, which is being passed as Float4x4 into the shader which then does a matrix operation.

Also, this might also be a hint as to why Unity’s builtin-values do not include _Camera2World?