filament
filament copied to clipboard
maybe miss match for ubershader
the uber shader try to find a material by matching material key to material's spec. in the below code, it tries to find in the order how we build the cache.
https://github.com/google/filament/blob/7eb756ca962f88234beaec6a611e704223d2e210/libs/gltfio/src/ArchiveCache.cpp#L81
And the order is specified by the cmake file as below https://github.com/google/filament/blob/7eb756ca962f88234beaec6a611e704223d2e210/libs/gltfio/CMakeLists.txt#L134
because of the optional tag of spec file, the ubershader output a transmission material instead of a specular, which is at last of build_ubershader in cmakelist.txt.
So, why is the call order of build_ubershader designed like this?