BabylonNative icon indicating copy to clipboard operation
BabylonNative copied to clipboard

Incorrect rendering when renderOverlay is set to true for meshes

Open PolygonalSun opened this issue 3 years ago • 4 comments

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 avatar Apr 01 '22 16:04 PolygonalSun

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

image

bghgary avatar Apr 01 '22 22:04 bghgary

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

https://github.com/BabylonJS/BabylonNative/blob/762acec36b069ebf37cc6b30b8d5d974c550ffe3/Plugins/NativeEngine/Source/NativeEngine.cpp#L806-L808

Removing bug tag.

bghgary avatar Apr 01 '22 23:04 bghgary

Log an error when this happens for now.

bghgary avatar Apr 05 '22 16:04 bghgary

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

bghgary avatar Oct 09 '23 20:10 bghgary