mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-13 05:54:59 -05:00
Merge pull request #185 from hiroj/fix_MetallicSmoothness
Fix to restore Smoothness value when setting Metallic map
This commit is contained in:
commit
9db72cd69a
|
|
@ -163,10 +163,15 @@ namespace UniGLTF
|
|||
var prop = "_MetallicGlossMap";
|
||||
material.SetTexture(prop, texture.ConvertTexture(prop));
|
||||
}
|
||||
|
||||
material.SetFloat("_Metallic", 1.0f);
|
||||
material.SetFloat("_GlossMapScale", 1.0f - x.pbrMetallicRoughness.roughnessFactor);
|
||||
}
|
||||
else
|
||||
{
|
||||
material.SetFloat("_Metallic", x.pbrMetallicRoughness.metallicFactor);
|
||||
material.SetFloat("_Glossiness", 1.0f - x.pbrMetallicRoughness.roughnessFactor);
|
||||
}
|
||||
|
||||
material.SetFloat("_Metallic", x.pbrMetallicRoughness.metallicFactor);
|
||||
material.SetFloat("_Glossiness", 1.0f - x.pbrMetallicRoughness.roughnessFactor);
|
||||
}
|
||||
|
||||
if (x.normalTexture != null && x.normalTexture.index != -1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user