Merge pull request #1841 from Santarh/uvdir2

Invert UV rotation direction of MToon 1.0 import/export.
This commit is contained in:
ousttrue 2022-10-04 17:03:55 +09:00 committed by GitHub
commit 903cfde3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -154,9 +154,7 @@ namespace UniVRM10
}
// Speed unit Conversion
const float rotationPerSecToRadianPerSec = Mathf.PI * 2f;
// Coords conversion
const float unityToGltfCoordsConversion = -1f;
mtoon.UvAnimationRotationSpeedFactor = context.UvAnimationRotationSpeedFactor * rotationPerSecToRadianPerSec * unityToGltfCoordsConversion;
mtoon.UvAnimationRotationSpeedFactor = context.UvAnimationRotationSpeedFactor * rotationPerSecToRadianPerSec;
// Texture Transforms
var scale = context.TextureScale;

View File

@ -226,9 +226,7 @@ namespace UniVRM10
{
// Speed unit Conversion
const float radianPerSecToRotationPerSec = 1f / (Mathf.PI * 2f);
// Coords conversion
const float gltfToUnityCoordsConversion = -1f;
yield return (MToon10Prop.UvAnimationRotationSpeedFactor.ToUnityShaderLabName(), uvAnimSpeedRotation.Value * radianPerSecToRotationPerSec * gltfToUnityCoordsConversion);
yield return (MToon10Prop.UvAnimationRotationSpeedFactor.ToUnityShaderLabName(), uvAnimSpeedRotation.Value * radianPerSecToRotationPerSec);
}
// UI