Siccity / GLTFUtility

Simple GLTF importer for Unity
MIT License
980 stars 217 forks source link

transparent shader: wrong alpha? #151

Open DelTaGC opened 2 years ago

DelTaGC commented 2 years ago

Hi, first I want to thank you for that amazing package!

While importing a model with some glass materials I was surprised to see it totally opaque. In the shader graph you linked Albedo Sample Texture Alpha ---> Fragment Alpha but I think it should be linking the Alpha coming from Albedo*Color so we can modify the alpha via the color picker.

subhradeepc commented 2 years ago

Same thing for me as well, would really appreciate if this gets solved as soon as possible, we are stuck ! @Siccity Thanks in advance!

Siccity commented 2 years ago

Can you share a file that has this issue?

nwessing commented 2 years ago

I have confirmed that I have this issue as well. I looked at the shader graph for transparent materials and the alpha value is taken directly from the texture, the alpha value from the texture should be multiplied with the alpha value of the pbrMetallicRoughness.baseColorFactor[3] value.

nwessing commented 2 years ago

image Making this change to the shadergraph seems to resolve the issue for me.

fusobotic commented 2 years ago

image Making this change to the shadergraph seems to resolve the issue for me.

This solved the issue for me too. This should definitely be merged in.