Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PolygonalSun opened this issue Apr 1, 2022 · 4 comments · Fixed by BabylonJS/Babylon.js#14405
Milestone

Comments

@PolygonalSun
Copy link
Contributor

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

@PolygonalSun PolygonalSun added the bug Something isn't working label Apr 1, 2022
@bghgary bghgary transferred this issue from BabylonJS/Babylon.js Apr 1, 2022
@bghgary
Copy link
Contributor

bghgary commented Apr 1, 2022

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

image

@bghgary bghgary changed the title Inconsistent overlay color/look for meshes Incorrect rendering when renderOverlay is set to true for meshes Apr 1, 2022
@bghgary
Copy link
Contributor

bghgary commented Apr 1, 2022

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.

@bghgary bghgary removed the bug Something isn't working label Apr 1, 2022
@bghgary
Copy link
Contributor

bghgary commented Apr 5, 2022

Log an error when this happens for now.

@bghgary
Copy link
Contributor

bghgary commented Oct 9, 2023

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

@bghgary bghgary reopened this Oct 9, 2023
@bghgary bghgary modified the milestones: 7.0, Future Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants