Skip to content

Transparent rectangle falsely overlaying transparent circle #443

Description

@Luckycleri

Describe the bug
When a rectangle is placed above a circle, and both are transparent, the circle is sometimes visible, and sometimes invisible behind the rectangle - depending on the angle.

To Reproduce
Steps to reproduce the behavior:

  1. Create a circle using THREE.CircleGeometry and make it transparent
  2. Create a rectangle above the circle using THREE.BufferGeometry and make it transparent
  3. Rotate the camera around both objects
  4. Sometimes the circle is visible, sometimes its invisible

Expected behavior
The circle is always visible behind the rectangle.

Relevant Code or Code Sandbox
CodeSandbox

Screenshots
Correct
Image
Incorrect
Image

  • [Version [e.g. 2.1.9]

Additional context
Some hints on what i found out:

When giving the circle renderOrder =1 and the rectangle renderOrder=2 everything works fine, which makes me think, that the renderBuffer which is probably the component managing renderOrder on camera position change has a problem.

Is this maybe something that is not entirely handled by threebox? If so i would be very glad if you could hint me at a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions