fix MaterialTests

This commit is contained in:
ousttrue
2021-03-03 12:57:35 +09:00
parent 06674b8de8
commit c083505ef5
2 changed files with 29 additions and 6 deletions

View File

@@ -191,6 +191,11 @@ namespace UniGLTF
var gltf = new glTF
{
materials = new System.Collections.Generic.List<glTFMaterial> { material },
textures = new List<glTFTexture>{
new glTFTexture{
name = "texture_0"
}
},
};
var task = DefaultCreateMaterialAsync(default(ImmediateCaller), gltf, i, null);
return task.Result;

View File

@@ -111,7 +111,10 @@ namespace UniGLTF
alphaMode = "OPAQUE",
pbrMetallicRoughness = new glTFPbrMetallicRoughness
{
baseColorTexture = new glTFMaterialBaseColorTextureInfo(),
baseColorTexture = new glTFMaterialBaseColorTextureInfo
{
index = 0,
},
},
extensions = glTF_KHR_materials_unlit.Serialize().Deserialize(),
};
@@ -127,7 +130,10 @@ namespace UniGLTF
pbrMetallicRoughness = new glTFPbrMetallicRoughness
{
baseColorFactor = new float[] { 1, 0, 0, 1 },
baseColorTexture = new glTFMaterialBaseColorTextureInfo(),
baseColorTexture = new glTFMaterialBaseColorTextureInfo
{
index = 0
},
},
extensions = glTF_KHR_materials_unlit.Serialize().Deserialize(),
};
@@ -157,7 +163,10 @@ namespace UniGLTF
alphaMode = "BLEND",
pbrMetallicRoughness = new glTFPbrMetallicRoughness
{
baseColorTexture = new glTFMaterialBaseColorTextureInfo(),
baseColorTexture = new glTFMaterialBaseColorTextureInfo
{
index = 0,
},
},
extensions = glTF_KHR_materials_unlit.Serialize().Deserialize(),
};
@@ -173,7 +182,10 @@ namespace UniGLTF
pbrMetallicRoughness = new glTFPbrMetallicRoughness
{
baseColorFactor = new float[] { 1, 0, 0, 1 },
baseColorTexture = new glTFMaterialBaseColorTextureInfo(),
baseColorTexture = new glTFMaterialBaseColorTextureInfo
{
index = 0,
},
},
extensions = glTF_KHR_materials_unlit.Serialize().Deserialize(),
};
@@ -188,7 +200,10 @@ namespace UniGLTF
alphaMode = "MASK",
pbrMetallicRoughness = new glTFPbrMetallicRoughness
{
baseColorTexture = new glTFMaterialBaseColorTextureInfo(),
baseColorTexture = new glTFMaterialBaseColorTextureInfo
{
index = 0,
},
},
extensions = glTF_KHR_materials_unlit.Serialize().Deserialize(),
};
@@ -204,7 +219,10 @@ namespace UniGLTF
pbrMetallicRoughness = new glTFPbrMetallicRoughness
{
baseColorFactor = new float[] { 1, 0, 0, 1 },
baseColorTexture = new glTFMaterialBaseColorTextureInfo(),
baseColorTexture = new glTFMaterialBaseColorTextureInfo
{
index = 0,
},
},
extensions = glTF_KHR_materials_unlit.Serialize().Deserialize(),
};