Skip to content

Commit

Permalink
Merge pull request #32 from croakfang/master
Browse files Browse the repository at this point in the history
improve face shadow and add live face shadow
  • Loading branch information
croakfang authored Sep 3, 2023
2 parents 677eda2 + 0fc1b86 commit 5bafe5f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Assets/Scripts/UmaContainerCharacter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,10 @@ private void FixedUpdate()
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());

}
}

Expand Down
9 changes: 9 additions & 0 deletions Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,15 @@ public void AlterUpdateFacialNew(ref FacialDataUpdateInfo updateInfo_, float liv
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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ public class TeardropConfig
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]
Expand Down

0 comments on commit 5bafe5f

Please sign in to comment.