mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-09 04:19:42 -05:00
The standard shader's texture refers to the maintex tiling
This commit is contained in:
@@ -53,7 +53,7 @@ namespace UniGLTF
|
||||
index = index,
|
||||
};
|
||||
|
||||
Export_TextureTransform(m, material.pbrMetallicRoughness.baseColorTexture, "_MainTex");
|
||||
Export_MainTextureTransform(m, material.pbrMetallicRoughness.baseColorTexture);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ namespace UniGLTF
|
||||
index = index,
|
||||
};
|
||||
|
||||
Export_TextureTransform(m, material.pbrMetallicRoughness.metallicRoughnessTexture, "_MetallicGlossMap");
|
||||
Export_MainTextureTransform(m, material.pbrMetallicRoughness.metallicRoughnessTexture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace UniGLTF
|
||||
index = index,
|
||||
};
|
||||
|
||||
Export_TextureTransform(m, material.normalTexture, "_BumpMap");
|
||||
Export_MainTextureTransform(m, material.normalTexture);
|
||||
}
|
||||
|
||||
if (index != -1 && m.HasProperty("_BumpScale"))
|
||||
@@ -138,7 +138,7 @@ namespace UniGLTF
|
||||
index = index,
|
||||
};
|
||||
|
||||
Export_TextureTransform(m, material.occlusionTexture, "_OcclusionMap");
|
||||
Export_MainTextureTransform(m, material.occlusionTexture);
|
||||
}
|
||||
|
||||
if (index != -1 && m.HasProperty("_OcclusionStrength"))
|
||||
@@ -173,11 +173,16 @@ namespace UniGLTF
|
||||
index = index,
|
||||
};
|
||||
|
||||
Export_TextureTransform(m, material.emissiveTexture, "_EmissionMap");
|
||||
Export_MainTextureTransform(m, material.emissiveTexture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void Export_MainTextureTransform(Material m, glTFTextureInfo textureInfo)
|
||||
{
|
||||
Export_TextureTransform(m, textureInfo, "_MainTex");
|
||||
}
|
||||
|
||||
static void Export_TextureTransform(Material m, glTFTextureInfo textureInfo, string propertyName)
|
||||
{
|
||||
if( textureInfo != null && m.HasProperty(propertyName))
|
||||
|
||||
Reference in New Issue
Block a user