Nope cant get the tweaking right

This is what I'm doing (converted to vb)
Dim LightViewProj As TV_3DMATRIX
math.TVMatrixInverse LightViewProj, 0, lightRS.GetCamera.GetMatrix
math.TVMatrixMultiply LightViewProj, LightViewProj, lightRS.GetCamera.GetProjectionMatrix
colorShader.SetEffectParamMatrix "lightCameraViewP", LightViewProj
And then in my shader I'm calculating the projection coordinates like so:
Vertex shader:
OUT.ShadowMapSamplingPos = mul(IN.position, lightCameraViewP);
OUT.depth = OUT.ShadowMapSamplingPos.z *BIAS;
And then in my pixel shader:
float2 ProjectedTexCoords;
ProjectedTexCoords[0] = IN.ShadowMapSamplingPos.x/IN.ShadowMapSamplingPos.w/2.0f + 0.5f;
ProjectedTexCoords[1] = -IN.ShadowMapSamplingPos.y/IN.ShadowMapSamplingPos.w/2.0f + 0.5f;
float depth = tex2D(DepthMapSampler, ProjectedTexCoords).r;
This is a clean method, but its driving me crazy

-------------------------------------------------------------------------------------------
Wow wait a minute- I just found out that some of my semantics are not properly being updated. I think that my vertex shader POSITION semantic might not contain the correct values, a object at vector 0,0,0 will cast a correct shadow, the further away from the origin the more I see an offset.
Also trying to send material data to the shader using semantics also isn't working.
Why wouldn't TV send the semantic data? The matrices are being updated?