Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it correct to use p_view.z as depth? #13

Open
AtlantixJJ opened this issue Dec 4, 2023 · 0 comments
Open

Is it correct to use p_view.z as depth? #13

AtlantixJJ opened this issue Dec 4, 2023 · 0 comments

Comments

@AtlantixJJ
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant