Oblique near clipping on perspective matrix
I try to use the sample from Eric Lengyel without success,
I think my problem is related to the clip plane, since my plane is from world coordinate, it say it need to be in camera eye coord,
Do I need transform my plane (world space) before using it?
The perspective matrix is build using glm::perspective, my matrix are basically glm::mat4...
matrix4 oblique = projection;
vector4 plane(normal, distance);
q.x = (sign(plane.x) + projection) / projection;
q.y = (sign(plane.y) + projection) / projection;
q.z = -1.0f;
q.w = (1.0f + projection) / projection;
vector4 c = plane * (2.0f / glm::dot(plane, q));
oblique = c.x;
oblique = c.y;
oblique = c.z + 1.0f;
oblique = c.w;
Here the shot using the projection without the oblique. The second shot show the issue I try to resolve with oblique near clip plane.
If I am using this code, I am jumping out of the map, I just see the sky :)