It is supposed to be the EntryPos, not the exit pos that is returned by the first part of that function, so maybe that’s it?
also looks like I may have forgotten that cameravector needs to be * (-1) in the density only version but its correct in the full code. Try replacing this line:
float3 localcamvec = -normalize( mul(Parameters.CameraVector, Primitive.WorldToLocal) );