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

Assertion failure when reusing texture in different material properties #8449

Open
hnlkm opened this issue Feb 17, 2025 · 0 comments
Open

Assertion failure when reusing texture in different material properties #8449

hnlkm opened this issue Feb 17, 2025 · 0 comments

Comments

@hnlkm
Copy link

hnlkm commented Feb 17, 2025

⚠️ Issues not using this template will be systematically closed.

Describe the bug
When loading a GLTF model that reuses the same texture across different material properties (e.g., the same texture used for both baseColorMap and occlusionMap), an assertion fails in Debug builds. The assertion assert_invariant(info.bindings.size() == 0 || info.flags == flags) in the texture loading code triggers when attempting to bind the same texture with different usage flags.

To Reproduce
Steps to reproduce the behavior:

  1. Use Filament's GLTF viewer in Debug build
  2. Load the attached VirtualCity.glb which reuses the same texture image for different material properties
  3. Assertion triggers during texture binding phase

Expected behavior
The same texture should be able to be used across different material properties without triggering an assertion, as this is valid according to the GLTF specification.

Logs

FEngine (64 bits) created at 0000020AD3882660 (threading is enabled)
Vulkan device driver: NVIDIA 566.36
Selected physical device 'NVIDIA GeForce RTX 3050 Laptop GPU' from 2 physical devices. (vendor 0x10de, device 0x25a2, driver 0x8d890000, api 1.3)
Backend feature level: 3
FEngine feature level: 3
Requested linear format but KTX contains a sRGB format.
Requested linear format but KTX contains a sRGB format.
Texture Decoder has 18 background threads.
vkCreateSwapchain: 1024x640, VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, swapchain-size=3, identity-transform=true, depth=VK_FORMAT_D32_SFLOAT_S8_UINT, protected=false
PanicLog
in void __cdecl utils::panic(const char *,const char *,int,const char *) noexcept:34
in file [...]/filament/libs/utils/src/debug.cpp
reason: [...]/filament/libs/gltfio/src/FilamentAsset.cpp:119: failed assertion 'info.bindings.size() == 0 || info.flags == flags'

Desktop (please complete the following information):

  • OS: Windows 11
  • GPU: NVIDIA GeForce RTX 3050 Laptop GPU
  • Backend: Vulkan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant