In forward.cu line 250, you calculate the depth as:
And p_view is obtained in line 190
in_frustum(idx, orig_points, viewmatrix, projmatrix, prefiltered, p_view)
where p_view = transformPoint4x3(p_orig, viewmatrix);
This means that p_view is the point transformed such that the camera is in canonical position. but not by the perspective matrix, projmatrix.
I think this will create a misalignment in the rendered data, because XYZ are transformed by perspective matrix.
Do I misunderstand your code?
In forward.cu line 250, you calculate the depth as:
And p_view is obtained in line 190
where p_view = transformPoint4x3(p_orig, viewmatrix);
This means that p_view is the point transformed such that the camera is in canonical position. but not by the perspective matrix,
projmatrix.I think this will create a misalignment in the rendered data, because XYZ are transformed by perspective matrix.
Do I misunderstand your code?