Update UniGLTF. Add sparse accessor experiment to VRMExporter

This commit is contained in:
ousttrue
2018-06-07 16:29:42 +09:00
parent e7c679c42b
commit 168b4bce69
3 changed files with 10 additions and 4 deletions

View File

@@ -16,7 +16,13 @@ namespace VRM
{
var gltf = new glTF_VRM();
gltf.asset.generator = string.Format("UniVRM-{0}.{1}", VRMVersion.MAJOR, VRMVersion.MINOR);
using (var exporter = new VRMExporter(gltf))
using (var exporter = new VRMExporter(gltf)
{
#if VRM_EXPORTER_USE_SPARSE
// experimental
UseSparseAccessorForBlendShape=true
#endif
})
{
_Export(gltf, exporter, go);

View File

@@ -78,8 +78,8 @@ namespace VRM
public static CreateMaterialFunc GetMaterialFunc(List<glTF_VRM_Material> materials)
{
var CreateDefault = gltfImporter.CreateMaterialFuncFromShader(Shader.Find("VRM/UnlitTexture"));
var CreateZWrite = gltfImporter.CreateMaterialFuncFromShader(Shader.Find("VRM/UnlitTransparentZWrite"));
var CreateDefault = gltfImporter.CreateMaterialFuncFromShader(new ShaderStore("VRM/UnlitTexture"));
var CreateZWrite = gltfImporter.CreateMaterialFuncFromShader(new ShaderStore("VRM/UnlitTransparentZWrite"));
CreateMaterialFunc fallback = (ctx, i) =>
{
var vrm = ctx.GLTF as glTF_VRM;