Godot Version
4.4.1
Question
I simply parse the result of camera.get_camera_projection() to uniform “cam_proj” in shader, the depth result is wrong and different from using PROJECTION_MATRIX directly. But position and shape of geometry are correct. What’s wrong please?
Here is my shader codes:
uniform mat4 cam_proj;
varying vec4 _clip_pos;void vertex()
{
_clip_pos = PROJECTION_MATRIX * MODELVIEW_MATRIX * vec4(VERTEX, 1.0);
_clip_pos = cam_proj* MODELVIEW_MATRIX * vec4(VERTEX, 1.0);
}