google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.44k stars 1.84k forks source link

Some GLTF files do not render on Vulkan #7674

Closed Nolram12345 closed 4 months ago

Nolram12345 commented 4 months ago

Describe the bug Some GLTF and especially GLB model files cause intense glitches when rendered with Filament on the Vulkan backend. This happens on a variety of GLB/GLTF models (about 25% of models tested).

To Reproduce Steps to reproduce the behavior:

  1. Download this example GLB by James Phan: Sketchfab Link
  2. Load the model into filament's GLTF viewer. The HDRI is irrelevant, but in my testing I used this free HDRI from PolyHaven.

Expected behavior The model should render correctly, as it does on the OpenGL backend.

Screenshots Here is the visual output on Vulkan: image

For reference, here is the exact same GLB loaded up in OpenGL: image

Logs The logs do not show anything extraordinary.

FEngine (64 bits) created at 000001C3D410F9F0 (threading is enabled)
Vulkan device driver: NVIDIA 551.61
Selected physical device 'NVIDIA GeForce RTX 4080' from 1 physical devices. (vendor 0x10de, device 0x2704, driver 0x89cf4000, api 1.3)
Backend feature level: 1
FEngine feature level: 1
vkCreateSwapchain: 1024x640, 44, 0, swapchain-size=3, identity-transform=true, depth=130
vkCreateSwapchain: 1920x1017, 44, 0, swapchain-size=3, identity-transform=true, depth=130

Desktop (please complete the following information):

romainguy commented 4 months ago

I can reproduce on macOS with MoltenVK (except it just renders black). GL and Metal work fine.

Nolram12345 commented 4 months ago

Any updates on this, such as diagnosis etc. would be much appreciated, as we are currently running into this problem in production quite a lot.

poweifeng commented 4 months ago

will take a look

Nolram12345 commented 4 months ago

From my brief testing, I'm suspecting it may be related to transparency.

poweifeng commented 4 months ago

I'm able to repo as well. Turning off MSAA made it go away, might serve as a temporary workaround.

Nolram12345 commented 4 months ago

Just tried this on AMD, the issue does not occur there. Also VRAM consumption on AMD with Vulkan is MUCH lower!