You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a file named WinterCabin.glb that renders like this in Unity:
And like this in other glTF viewers:
I took a stab at debugging the issue and it looks like the two materials within WinterCabin.glb are marked as "alphaMode":"MASK" (which is kind of silly since I don't really need to be). Anyway, when I import the file with glTFast the two material's "Surface Types" are "Transparent" (rather than "Opaque") which is enabling alpha blending and the sorting artifacts you see in the first image.
Drag and drop the imported model into a Unity scene
See artifacts
* Note the project this was tested in is using Unity 2022.3, URP, and glTFast 6.10.1.
Expected behavior
The WinterCabin.glb renders without sorting artifacts.
I think the issue in this case is the GetSpecularShaderFeatures method enables alpha blending if the mode is anything but opaque. Maybe the check in that method should be if (gltfMaterial.GetAlphaMode() == AlphaMode.Blend) so that AlphaMode.Mask materials can also be opaque?
Desktop (please complete the following information):
glTFast version 6.10.1
Unity Editor version 2022.3.34f1
Render Pipeline and version Universal Render Pipeline 14.0.11 (Forward rendering)
Platform: Editor (Windows)
The text was updated successfully, but these errors were encountered:
Describe the bug

I have a file named WinterCabin.glb that renders like this in Unity:
And like this in other glTF viewers:

I took a stab at debugging the issue and it looks like the two materials within WinterCabin.glb are marked as
"alphaMode":"MASK"
(which is kind of silly since I don't really need to be). Anyway, when I import the file with glTFast the two material's "Surface Types" are "Transparent" (rather than "Opaque") which is enabling alpha blending and the sorting artifacts you see in the first image.Files
WinterCabin.zip
To Reproduce
Steps to reproduce the behavior:
* Note the project this was tested in is using Unity 2022.3, URP, and glTFast 6.10.1.
Expected behavior
The WinterCabin.glb renders without sorting artifacts.
I think the issue in this case is the GetSpecularShaderFeatures method enables alpha blending if the mode is anything but opaque. Maybe the check in that method should be
if (gltfMaterial.GetAlphaMode() == AlphaMode.Blend)
so that AlphaMode.Mask materials can also be opaque?Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: