From 419d3d463720f00e82d2a15f481c08b2103fd37d Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Sun, 3 Sep 2023 12:53:30 +0800 Subject: [PATCH 1/2] bug fix --- Assets/Scripts/UmaContainerCharacter.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Assets/Scripts/UmaContainerCharacter.cs b/Assets/Scripts/UmaContainerCharacter.cs index 6970d28..3cc4753 100644 --- a/Assets/Scripts/UmaContainerCharacter.cs +++ b/Assets/Scripts/UmaContainerCharacter.cs @@ -397,11 +397,10 @@ public class UmaContainerCharacter : UmaContainer FaceMaterial.SetVector("_FaceUp", HeadBone.transform.up); FaceMaterial.SetVector("_FaceCenterPos", HeadBone.transform.position); } - FaceMaterial.SetFloat("_faceShadowEndY", HeadBone.transform.position.y); + FaceMaterial.SetMatrix("_faceShadowHeadMat", HeadBone.transform.worldToLocalMatrix); } TearControllers.ForEach(a => a.UpdateOffset()); - } } From 0fc1b8672a2a801cab70ea95c2f22948a0c980c9 Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Sun, 3 Sep 2023 21:42:49 +0800 Subject: [PATCH 2/2] add live face shadow --- Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs | 9 +++++++++ .../Cutt/LiveTimelineDataList/LiveTimelineFacialData.cs | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index 6c3151d..786f455 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -976,6 +976,15 @@ namespace Gallop var tearytype = info.tearyType; StaticTearMorph.BindProperties.ForEach(p => p.Value = tearytype); + var shaderEnable = ((int)info.attribute & LiveTimelineKeyFacialEffectData.kAttrFaceShadowVisible) > 0; + if (shaderEnable) + { + ShadeMorph.BindProperties[0].Value = Mathf.MoveTowards(ShadeMorph.BindProperties[0].Value, 1, Time.deltaTime * 2); + } + else + { + ShadeMorph.BindProperties[0].Value = 0; + } ChangeMorphEffect(); } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialData.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialData.cs index a5b5ea7..d73f148 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialData.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialData.cs @@ -131,6 +131,14 @@ namespace Gallop.Live.Cutt public int tearfulType; public TeardropConfig[] teardropConfigs; public int mangameIndex; + + public const int kAttrCheek = 65536; + public const int kAttrTeary = 131072; + public const int kAttrTearful = 262144; + public const int kAttrTeardrop = 524288; + public const int kAttrMangame = 2097152; + public const int kAttrFaceShadow = 4194304; + public const int kAttrFaceShadowVisible = 8388608; } [System.Serializable]