Issue with emissive, Transparent, and Unlit Materials at the runtime
Describe the Bug We use .glb and .gltf files widely in our projects. To improve performance, we started using glTFast, but we're facing issues specifically in VR and Android builds at runtime. The main problems relate to transparent, emissive, and unlit materials:
- Unlit models often appear darker than expected or aren't unlit at all.
- Models emissive colors can not be change at the runtime!
- Transparent are darker or solid at the runtime!
In many cases, they render significantly worse compared to Unity’s native GltfAsset component in the editor or the Piglet plugin at the runtime loader.
These issues are especially severe at runtime on Android and Quest compared to the Editor.
Files You can find the models here: https://drive.google.com/drive/folders/1x3RgPWSetsahTxspoteIAbXB9wyhYmiV?usp=drive_link
To Reproduce Import the provided models at runtime using glTFast and compare their rendering with Piglet or Unity’s native GltfAsset component.
Screenshots:
From left to right: Unity direct import using the GltfAsset component / Piglet runtime loader / glTFast runtime loader from StreamingAssets.
Emissive not working (Old Room)
Transparent issue (Palm tree)
Unlit issue (Old Room)
Texture and unlit issue (Anime Room)
Different visual than Piglet and Unity Editor import for transparent and unlit shaders (Car)
Texture load issue, unlit issue (Modern Room)
Environment
- glTFast version: 6.12.1
- Unity Editor version: Unity 6.1.9f1 and 2022.3.57
- Render Pipeline: URP 17.1
- Platforms: Unity Editor, Android, Meta Quest
-
- Platform: (Editor, android, quest )
Hi and thanks for reporting,
I haven't had time to look into the details yet. With regards to discrepancies between in-Editor and at runtime: Very often a specific shader variant is required to render correctly. If that variant was not included at build time the default behavior is to fall back to the next closest variant. One symptom could be that a particular material feature does not work. Please check if all shader variants required are bundled.
I'll try to have a closer look into all issues mentioned soon.
Hi, thanks for the explanation.
The screenshots I shared were taken during runtime in Editor mode, not in a standalone build. So far, I'm seeing the same issue in the Editor, which might suggest it's not just a build-time shader stripping issue.
I’d appreciate it if you could take a deeper look when you have time. Let me know if there’s anything specific you’d like me to check in the meantime.
Hi @attender,
Have you had a chance to take a closer look at this issue? If you need more information, please let me know.
Thanks!