Skip to content

Incorrect rendering when renderOverlay is set to true for meshes #1053

Open
BabylonJS/Babylon.js
#14405

Description

@PolygonalSun

In BabylonReactNative, when you set renderOverlay to true for a mesh, the overlay will display with inconsistent color across the mesh:
iOS
ios.png
Android
android.png

Note: This behavior is not present in BabylonNative.

Bugs

Repro:

Set renderOverlay to true for one of the meshes in App.tsx

Expected result:

Uniform overlay look and color

Current result:

See pics above

Activity

  1. added
    bug
    on Apr 1, 2022
  2. bghgary commented on Apr 1, 2022

    @bghgary
    Contributor

    This is what happens on the PG. I think there is some z-fighting issues in native.
    https://playground.babylonjs.com/#JPXG9M

    image

  3. changed the title [-]Inconsistent overlay color/look for meshes[/-] [+]Incorrect rendering when renderOverlay is set to true for meshes[/+] on Apr 1, 2022
  4. bghgary commented on Apr 1, 2022

    @bghgary
    Contributor

    The issue is that renderOverlay uses zOffset which is not supported in Babylon Native yet because it's not supported in bgfx.

    // TODO: zOffset
    /*const float zOffset =*/ data.ReadFloat32();
    /*const float zOffsetUnits =*/ data.ReadFloat32();

    Removing bug tag.

  5. removed
    bug
    on Apr 1, 2022
  6. bghgary commented on Apr 5, 2022

    @bghgary
    Contributor

    Log an error when this happens for now.

  7. added this to the 6.0 milestone on Sep 23, 2022
  8. modified the milestones: 6.0, Future on Dec 8, 2022
  9. modified the milestones: Future, 7.0 on May 11, 2023
  10. bghgary commented on Oct 9, 2023

    @bghgary
    Contributor

    This issue probably shouldn't be closed. It is still a problem even though we added a warning.

  11. reopened this on Oct 9, 2023
  12. modified the milestones: 7.0, Future on Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions