Transformation matrix not doing translations

So I’ve been banging my head against the wall with this for a while, maybe somebody else can enlighten me.

I have a matrix being set in a shader using Shader.SetGlobalMatrix that’s working with everything except translation. It’s as if it’s a 3x3 matrix instead of a 4x4 matrix. There’s no difference between this:

	Matrix4x4 transformMatrix = target.projectionMatrix;
	Shader.SetGlobalMatrix("_LightTransform", transformMatrix);

and this:

	Matrix4x4 transformMatrix = target.projectionMatrix * Matrix4x4.TRS(10000 * Vector3.one, Quaternion.identity, Vector3.one);
	Shader.SetGlobalMatrix("_LightTransform", transformMatrix);

Relevant shader code:

	o.uv.zw = (mul(_LightTransform * _Object2World,  v.vertex).xy + float2(1, 1)) * 0.5;

Any help would be appreciated!

I figured it out just after posting this. The _Object2World matrix isn’t super friendly. Working code is:

float4 worldpos = mul(_Object2World, v.vertex);
worldpos.w = 1;
float4 transform = mul(_LightTransform, worldpos);
o.uv.zw = (transform.xy + float2(1, 1)) * 0.5;

Turns out the _Object2World multiplication was setting the w value to zero.