I have 2 shading models right now, one is using voxels the other one is the standard projection absed renderization method.
Putting them side by side I have noticed that no matter what I do one is mirrored with respect to the other.
To show what I mean I have a program that renders the scene with both models simultaneously. Supposedly the model loads the same camera parameters to both shading programs, so both should "see" the same thing.
This is what I mean:
In this screenshot pay attention to the color pairings. We have:
Left: green-red at back; red-blue at front
Right: blue-red at back; red-green at front
On this image, which corresponds to a 180 rotation however we get:
Left: blue-red at back; red-green at front
Right: green-red at back; red-blue at front
So the image seems to be mirrored. However I have tried inverting the polarity of multiple parameters without success. I tried negating the focal length of the camera. Negating the x value of the ray. Negating both...
However no matter which combination of parameters I try I get some form of mirroring (no always the same one).
I calculate the ray in teh raytracer as:
vec3 r = (vec3(f_coord.xy,1.f/tan(radians(40))));
r.y /= aspect_ratio;
vec3 dir = vec3(view_m*vec4(normalize(r),0));
dir = normalize(dir);
r = camera_pos;
Where f_coord is the normalized -1 to 1 coordinate of the current pixel and