glTFast
glTFast copied to clipboard
Issue rendering textures with images that have transparency
Describe the bug I am trying to view a GLTF model with textures whose PNG already has transparency. For me the rendering is a little weird for reason that I will explain:
These are the GLTF being rendered by GLTFast and by the Windows embedded 3d viewer
There is some noticable differences in parts where the image used by texture have a great deal of transparency:
The transparency in this region is very high, and I was expecting to see a color more reddish instead of whitish/greyish due to the low amount of alpha (I highlighted in blue the region I had selected for displaying the color information including alpha):
I have verified this problem in Unity 2022.1.13f1 and Unity 2022.3.18f1 using URP in both and GLTfast 5.0 and GLTFast 6.6 and 6.7, so, it is not a new problem. In my understanding the rendering output by the viewers like the WIndows Embedded and others in web that I have tested are saner that which is presented by GLTFast. Simply put, I could achieve a similar look by GLTF pasting the image (with alpha taken away) on top of a red background that matches with the base color texture of my sample. So, my conclusion is that in these cases the transparency is being ignored.
Additionally in 6.6 I could confirm the same issue in the builtin pipeline and HDRP I couldn't check because it was plainly wrong (It was solved in https://github.com/atteneder/glTFast/issues/699 that I had opened).
All tests were made in Windows 11, both in Editor as in a build. It follows the test sample that I have used for my tests (using builtin pipeline).