Skip to content

Rendering depth is broken for non-perspective cameras #254

@TimSchneider42

Description

@TimSchneider42

Hi,

When computing the depth, the renderer seems to always assume that the camera is a perspective camera (see Renderer.read_depth_buf). If we use a different camera, like an orthographic camera, the depth is no longer computed correctly.

The solution is to take the type of camera into account when computing the depth. Somebody already did this in a pull request in 2019, but it never got merged (see #40). Is there a reason for that? I currently have to resort to undoing the wrong computation manually and then applying the correct formula as a workaround to get the depth, which is quite an ugly hack.

Best,
Tim

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