Skip to content

Depth offset moves lines and points in (Web)GL #4787

@s-nie

Description

@s-nie

This may be related to #1025. There are also mentions of reduced depth precision with GL in the source code, but I couldn't find anything mentioning this specific issue.

While implementing a custom viewport based on re_renderer, I noticed a strange behavior when lines and points have a depth offset value. There seems to be some sort of parallax effect when the objects are not centered in the view. The effect is more pronounced the larger the offset value is. In the video below, I used a value of 200 for the manipulator gizmos and 0 for the spiral objects.

output.mp4

To Reproduce
Steps to reproduce the behavior:

  1. Create a viewport
  2. Add points and lines to it with different depth offsets
  3. Move the camera in the viewport
  4. Run in (web)GL

Expected behavior
The depth offset does not cause any translation based on the camera position. In the video above that would mean that the gizmos stay centered on the spirals.

Rerun version
0.12.0

Additional context
Things look as expected with the vulkan backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions