diff-gaussian-rasterization
diff-gaussian-rasterization copied to clipboard
Is it correct to use p_view.z as depth?
In forward.cu line 250, you calculate the depth as:
depths[idx] = p_view.z;
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?