I need help with creating the projection-view matrix for a perspective camera.
I have this piece of code already...
viewMatrix.setLookAt(position, cameraLookAt, cameraUp);...that generates a `Matrix4f` that I can pass to my vertexshader to convert world coordinates to NDC.
projectionMatrix.setPerspective(fov, aspectRatio, nearPlane, farPlane);
Matrix4f projectionViewMatrix = new Matrix4f().set(projectionMatrix).mul(viewMatrix);
// projectionViewMatrix holds the result
This currently works... kinda. Everything that gets rendered is inverted on the Y-axis (upside down).
I've looked for solutions online, tried the various invert-methods of the `Matrix4f`-class,
but everything I tried just does not render anything.