fix tests

This commit is contained in:
Masataka SUMI 2022-11-07 21:30:00 +09:00
parent ac880243d3
commit 763d0b516b
4 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,5 @@
using NUnit.Framework;
using System;
using NUnit.Framework;
using UnityEngine;
using UniJSON;
using System.Linq;
@ -262,7 +263,6 @@ namespace UniGLTF
var gltfMaterial = materialExporter.ExportMaterial(material, textureExporter, new GltfExportSettings());
var maxComponent = Mathf.GammaToLinearSpace(2f);
Assert.That(gltfMaterial.emissiveFactor, Is.EqualTo(new float[] { 0f, 1f / maxComponent, 1f }).Within(0.5f / 255f));
}
}

View File

@ -359,7 +359,7 @@ namespace UniVRM10
new Color(0.5f, 0.5f, 0.5f, 1),
new Color(0f, 0f, 0f, 1),
new Color(0f, 0f, 0f, 1),
new Color( Mathf.Pow(0.5f, 1f/2.2f), Mathf.Pow(0.5f, 1f/2.2f), Mathf.Pow(0.5f, 1f/2.2f), 1),
new Color(Mathf.LinearToGammaSpace(0.5f), Mathf.LinearToGammaSpace(0.5f), Mathf.LinearToGammaSpace(0.5f), 1),
new Color(0f, 0f, 0f, 1),
new Color(0f, 0f, 0f, 1),
};