Hm, there must be a world matrix because if it were an identity-matrix,
Code:
float3 vec = (mul(float4(In.Pos.xyz, 1), (float4x4)matWorld)).xyz - vecViewPos.xyz;

would be reduced to
Code:
float3 vec = In.Pos.xyz - vecViewPos.xyz;


but this doesn't work for me.

On the other hand, I face other problems: when I replace matWorldViewProj in my calculation of Out.Pos with
Code:
mul(matWorld, matViewProj)



The sky gets clipped:


This doesn't happen, when I concatenate matWorldView with matProj like this:
Code:
mul(matWorldView, matProj)