position is the vertex position passed from the vertex shader to the CalcView function.
float3 cameraTarget = position;
This is probably what is messing you up do you have a little dot in the very center of your render ?
your function should take the position of your camera in world space the camera's forward instead of (float3 cameraTarget = position;) and the cameras up. Also the eye vector is calculated by this functional portion at the bottom.
result = 0.0 - dot(xAxis, cameraPosition);
result = 0.0 - dot(yAxis, cameraPosition);
result = 0.0 - dot(zAxis, cameraPosition);
Also this line here is a terrible idea.
float3 xAxis = normalize(cross(float3(0, 1, 0), zAxis));
This locks your camera into being a fixed camera and if your forward or in this weird case your forward pixels are near that gimble point it will nan all those values and put a black hole in your render.
Of course that will never happen because your forward cannot be a pixel position.
Eg basically your camera is panning all over in the space of a frame per pixel.
Let me just relabel some of these really quick to exemplify
Consider a full triangle's positions, imagine a triangle that is just plain huge.
Then consider one frame with this code all the positions that triangle interpolates in that frame applied to your code.
float3 hardCodedStaticUp = cross(float3(0, 1, 0);
float3 Forward = normalize(cameraPosition - cameraTarget); // in motion were it should be static
float3 Right= normalize(cross(hardCodedStaticUp, Forward )); // a forward vector of 0,1,0 will cause gimble lock.
float3 Up= cross(Forward , Right); // Up is now in motion also
// The whole matrice is probably no longer orthanormal either now.
result = Forward.x;
result = Forward.y;
result = Forward.z;
// this forwards normal vector depends on the pixel position not the cameras look at vector.
If you were to actually pass the vertice position to a function like this even if it was a matrix being built per pixel, it would be a huge hit on the gpu to boot, the shader normally caches the 4x4 and reuses the precalculated results to do a vector multiply against the matrix. The concatenated view and projection matrices can also get premultiplied by the shader and cached.
You could work directly in clip space if you really wanted but there is a reason it is done the way it is. What you are doing with this is basically dancing on just the very edge of it. By it i mean endless troubles of a similar sort.