Skip to content

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

@AtlantixJJ

Description

@AtlantixJJ

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions